home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume7 / xdvi / patch9.2 < prev    next >
Encoding:
Internet Message Format  |  1990-05-17  |  63.8 KB

  1. Path: uunet!snorkelwacker!apple!sun-barr!newstop!sun!guinness.ias.edu.edu.
  2. From: vojta@guinness.ias.edu.edu. (Paul A Vojta)
  3. Newsgroups: comp.sources.x
  4. Subject: v07i053: xdvi (dvi previewer), Patch9, Part02/02
  5. Message-ID: <135892@sun.Eng.Sun.COM>
  6. Date: 17 May 90 20:38:29 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 2374
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: vojta@guinness.ias.edu.edu. (Paul A Vojta)
  12. Posting-number: Volume 7, Issue 53
  13. Archive-name: xdvi/patch9.2
  14. Patch-To: xdvi: Volume 3, Issues 37-39
  15. Patch-To: Volume 4, Issue 44 (xdvi, Patch4)
  16. Patch-To: Volume 4, Issue 96 (xdvi, dvi previewer, Patch5)
  17. Patch-To: Volume 5, Issue 35 (xdvi, dvi previewer, patch 6, part 1/2)
  18. Patch-To: Volume 5, Issue 36 (xdvi, dvi previewer, patch 6, part 2/2)
  19. Patch-To: Volume 6, Issue  5 (xdvi, Patch7)
  20. Patch-To: Volume 6, Issue 49 (xdvi, dvi previewer, patch 8)
  21.  
  22. diff -cr old/xdvi.c new/xdvi.c
  23. *** old/xdvi.c    Mon May  7 18:48:40 1990
  24. --- new/xdvi.c    Wed May 16 19:38:54 1990
  25. ***************
  26. *** 31,50 ****
  27.   static    struct {char    a[36], b, c;}
  28.   #ifndef X10
  29.       dv_c = {"$Header: xdvi.c (X11), patchlevel = ", '0' + PATCHLEVEL, 0};
  30. ! #else X10
  31.       dv_c = {"$Header: xdvi.c (X10), patchlevel = ", '0' + PATCHLEVEL, 0};
  32. ! #endif X10
  33. ! #endif    lint
  34.   
  35.   #ifndef    ALTFONT
  36.   #define    ALTFONT    "cmr10"
  37. ! #endif    ALTFONT
  38.   
  39.   #ifndef    A4
  40.   #define    DEFAULT_PAPER        "us"
  41. ! #else    A4
  42.   #define    DEFAULT_PAPER        "a4"
  43. ! #endif    A4
  44.   
  45.   #if    !defined(X10) && !defined(NOTOOL)
  46.   #define    TOOLKIT
  47. --- 31,50 ----
  48.   static    struct {char    a[36], b, c;}
  49.   #ifndef X10
  50.       dv_c = {"$Header: xdvi.c (X11), patchlevel = ", '0' + PATCHLEVEL, 0};
  51. ! #else
  52.       dv_c = {"$Header: xdvi.c (X10), patchlevel = ", '0' + PATCHLEVEL, 0};
  53. ! #endif
  54. ! #endif    /* lint */
  55.   
  56.   #ifndef    ALTFONT
  57.   #define    ALTFONT    "cmr10"
  58. ! #endif
  59.   
  60.   #ifndef    A4
  61.   #define    DEFAULT_PAPER        "us"
  62. ! #else
  63.   #define    DEFAULT_PAPER        "a4"
  64. ! #endif
  65.   
  66.   #if    !defined(X10) && !defined(NOTOOL)
  67.   #define    TOOLKIT
  68. ***************
  69. *** 59,76 ****
  70.   #include <X11/Xutil.h>
  71.   #include <X11/cursorfont.h>
  72.   #include "xdvi.icon"
  73. ! #else X10
  74.   #include <X/Xlib.h>
  75. ! #endif X10
  76.   
  77.   #ifdef    TOOLKIT
  78.   #include <X11/Intrinsic.h>
  79.   #ifdef OLD_X11_TOOLKIT
  80.   #include <X11/Atoms.h>
  81. ! #else not OLD_X11_TOOLKIT
  82.   #include <X11/Xatom.h>
  83.   #include <X11/StringDefs.h>
  84. ! #endif not OLD_X11_TOOLKIT
  85.   #include <X11/Shell.h>    /* needed for def. of XtNiconX */
  86.   #ifndef    XtSpecificationRelease
  87.   #define    XtSpecificationRelease    0
  88. --- 59,76 ----
  89.   #include <X11/Xutil.h>
  90.   #include <X11/cursorfont.h>
  91.   #include "xdvi.icon"
  92. ! #else /* X10 */
  93.   #include <X/Xlib.h>
  94. ! #endif /* X10 */
  95.   
  96.   #ifdef    TOOLKIT
  97.   #include <X11/Intrinsic.h>
  98.   #ifdef OLD_X11_TOOLKIT
  99.   #include <X11/Atoms.h>
  100. ! #else /* not OLD_X11_TOOLKIT */
  101.   #include <X11/Xatom.h>
  102.   #include <X11/StringDefs.h>
  103. ! #endif /* not OLD_X11_TOOLKIT */
  104.   #include <X11/Shell.h>    /* needed for def. of XtNiconX */
  105.   #ifndef    XtSpecificationRelease
  106.   #define    XtSpecificationRelease    0
  107. ***************
  108. *** 79,92 ****
  109.   #include <X11/Xaw/Viewport.h>
  110.   #ifdef    BUTTONS
  111.   #include <X11/Xaw/Command.h>
  112. ! #endif    BUTTONS
  113. ! #else    XtSpecificationRelease
  114.   #include <X11/Viewport.h>
  115.   #ifdef    BUTTONS
  116.   #include <X11/Command.h>
  117. ! #endif    BUTTONS
  118. ! #endif    XtSpecificationRelease
  119. ! #else    TOOLKIT
  120.   #define    XtNumber(arr)    (sizeof(arr)/sizeof(arr[0]))
  121.   typedef    int        Position;
  122.   typedef    unsigned int    Dimension;
  123. --- 79,92 ----
  124.   #include <X11/Xaw/Viewport.h>
  125.   #ifdef    BUTTONS
  126.   #include <X11/Xaw/Command.h>
  127. ! #endif
  128. ! #else    /* XtSpecificationRelease < 4 */
  129.   #include <X11/Viewport.h>
  130.   #ifdef    BUTTONS
  131.   #include <X11/Command.h>
  132. ! #endif
  133. ! #endif    /* XtSpecificationRelease */
  134. ! #else    /* !TOOLKIT */
  135.   #define    XtNumber(arr)    (sizeof(arr)/sizeof(arr[0]))
  136.   typedef    int        Position;
  137.   typedef    unsigned int    Dimension;
  138. ***************
  139. *** 93,103 ****
  140.   #ifndef X10
  141.   typedef    unsigned int    Pixel;
  142.   #define    XtPending()    XPending(DISP)
  143. ! #else X10
  144.   #define    XtPending    XPending
  145.   #define    XMoveResizeWindow XConfigureWindow
  146. ! #endif X10
  147. ! #endif    TOOLKIT
  148.   
  149.   #include <stdio.h>
  150.   #include <ctype.h>
  151. --- 93,103 ----
  152.   #ifndef X10
  153.   typedef    unsigned int    Pixel;
  154.   #define    XtPending()    XPending(DISP)
  155. ! #else
  156.   #define    XtPending    XPending
  157.   #define    XMoveResizeWindow XConfigureWindow
  158. ! #endif
  159. ! #endif    /* TOOLKIT */
  160.   
  161.   #include <stdio.h>
  162.   #include <ctype.h>
  163. ***************
  164. *** 106,112 ****
  165.   #ifdef    HAS_SIGIO
  166.   #include <fcntl.h>
  167.   #include <signal.h>
  168. ! #endif    HAS_SIGIO
  169.   
  170.   #ifndef X10
  171.   static    Display    *DISP;
  172. --- 106,112 ----
  173.   #ifdef    HAS_SIGIO
  174.   #include <fcntl.h>
  175.   #include <signal.h>
  176. ! #endif
  177.   
  178.   #ifndef X10
  179.   static    Display    *DISP;
  180. ***************
  181. *** 124,131 ****
  182.   #define    Flush()        XFlush(DISP)
  183.   #ifndef X11HEIGHT
  184.   #define    X11HEIGHT    8    /* Height of server default font */
  185. ! #endif X11HEIGHT
  186. ! #else X10
  187.   #define    DPY
  188.   #define    GC        int
  189.   #define    SetCursor(x)
  190. --- 124,131 ----
  191.   #define    Flush()        XFlush(DISP)
  192.   #ifndef X11HEIGHT
  193.   #define    X11HEIGHT    8    /* Height of server default font */
  194. ! #endif
  195. ! #else    /* X10 */
  196.   #define    DPY
  197.   #define    GC        int
  198.   #define    SetCursor(x)
  199. ***************
  200. *** 140,147 ****
  201.   #ifndef X10FONT
  202.   #define    X10FONT    "helv10b"    /* Font for X10 error messages */
  203.   #define    X10HEIGHT    10
  204. ! #endif X10FONT
  205. ! #endif X10
  206.   
  207.   #define    MAGBORD    1    /* border size for magnifier */
  208.   char    *alt_font = ALTFONT;
  209. --- 140,147 ----
  210.   #ifndef X10FONT
  211.   #define    X10FONT    "helv10b"    /* Font for X10 error messages */
  212.   #define    X10HEIGHT    10
  213. ! #endif
  214. ! #endif    /* X10 */
  215.   
  216.   #define    MAGBORD    1    /* border size for magnifier */
  217.   char    *alt_font = ALTFONT;
  218. ***************
  219. *** 180,193 ****
  220.   #define    fore_Pixel    fore_args.value
  221.   static    Arg    back_args = {XtNbackground,    (XtArgVal) 0};
  222.   #define    back_Pixel    back_args.value
  223. ! #else    TOOLKIT
  224.   static    Pixel    fore_Pixel, back_Pixel;
  225. ! #endif    TOOLKIT
  226. ! static    Pixel    hl_Pixel, cr_Pixel;
  227. ! #endif X10
  228.   
  229.   static    char    *fore_color;
  230.   static    char    *back_color;
  231.   static    char    *high_color;
  232.   static    char    *curs_color;
  233.   static    GC    foreGC, highGC;
  234. --- 180,194 ----
  235.   #define    fore_Pixel    fore_args.value
  236.   static    Arg    back_args = {XtNbackground,    (XtArgVal) 0};
  237.   #define    back_Pixel    back_args.value
  238. ! #else    /* !TOOLKIT */
  239.   static    Pixel    fore_Pixel, back_Pixel;
  240. ! #endif    /* TOOLKIT */
  241. ! static    Pixel    brdr_Pixel, hl_Pixel, cr_Pixel;
  242. ! #endif    /* X10 */
  243.   
  244.   static    char    *fore_color;
  245.   static    char    *back_color;
  246. + static    char    *brdr_color;
  247.   static    char    *high_color;
  248.   static    char    *curs_color;
  249.   static    GC    foreGC, highGC;
  250. ***************
  251. *** 194,202 ****
  252.   #ifndef X10
  253.   static    GC    ruleGC;
  254.   static    GC    foreGC2;
  255. ! #else X10
  256.   #define    ruleGC    foreGC
  257. ! #endif X10
  258.   
  259.   int    page_w, page_h;
  260.   #define    clip_w    mane.width
  261. --- 195,203 ----
  262.   #ifndef X10
  263.   static    GC    ruleGC;
  264.   static    GC    foreGC2;
  265. ! #else    /* X10 */
  266.   #define    ruleGC    foreGC
  267. ! #endif    /* X10 */
  268.   
  269.   int    page_w, page_h;
  270.   #define    clip_w    mane.width
  271. ***************
  272. *** 205,211 ****
  273.   #ifndef X10
  274.   static    Position    main_x, main_y;
  275.   static    XImage    *image;
  276. ! #else X10
  277.   #define    main_x    0
  278.   #define    main_y    0
  279.   static    int    GXfunc;
  280. --- 206,212 ----
  281.   #ifndef X10
  282.   static    Position    main_x, main_y;
  283.   static    XImage    *image;
  284. ! #else    /* X10 */
  285.   #define    main_x    0
  286.   #define    main_y    0
  287.   static    int    GXfunc;
  288. ***************
  289. *** 215,221 ****
  290.    */
  291.   #include "xdvi_curs.h"
  292.   #include "xdvi_mask.h"
  293. ! #endif X10
  294.   
  295.   static    Position mag_x, mag_y, new_mag_x, new_mag_y;
  296.   static    Boolean    mag_moved = False;
  297. --- 216,222 ----
  298.    */
  299.   #include "xdvi_curs.h"
  300.   #include "xdvi_mask.h"
  301. ! #endif    /* X10 */
  302.   
  303.   static    Position mag_x, mag_y, new_mag_x, new_mag_y;
  304.   static    Boolean    mag_moved = False;
  305. ***************
  306. *** 240,246 ****
  307.       {XtNbottom,    (XtArgVal) XtChainBottom},
  308.       {XtNleft,    (XtArgVal) XtChainLeft},
  309.       {XtNright,    (XtArgVal) XtChainRight},
  310. ! #endif    BUTTONS
  311.       {XtNallowHoriz,    (XtArgVal) True},
  312.       {XtNallowVert,    (XtArgVal) True},
  313.   };
  314. --- 241,247 ----
  315.       {XtNbottom,    (XtArgVal) XtChainBottom},
  316.       {XtNleft,    (XtArgVal) XtChainLeft},
  317.       {XtNright,    (XtArgVal) XtChainRight},
  318. ! #endif
  319.       {XtNallowHoriz,    (XtArgVal) True},
  320.       {XtNallowVert,    (XtArgVal) True},
  321.   };
  322. ***************
  323. *** 319,327 ****
  324.       {XtNheight,    (XtArgVal) 30},
  325.       {XtNcallback,    (XtArgVal) command_call},
  326.   };
  327. ! #endif    BUTTONS
  328.   
  329. ! #else    TOOLKIT
  330.   #define    BAR_WID        12    /* width of darkened area */
  331.   #define    BAR_THICK    15    /* gross amount removed */
  332.   
  333. --- 320,328 ----
  334.       {XtNheight,    (XtArgVal) 30},
  335.       {XtNcallback,    (XtArgVal) command_call},
  336.   };
  337. ! #endif    /* BUTTONS */
  338.   
  339. ! #else    /* !TOOLKIT */
  340.   #define    BAR_WID        12    /* width of darkened area */
  341.   #define    BAR_THICK    15    /* gross amount removed */
  342.   
  343. ***************
  344. *** 328,334 ****
  345.   static    Window    top_level;
  346.   static    Window    x_bar, y_bar;
  347.   static    int    x_bgn, x_end, y_bgn, y_end;    /* scrollbar positions */
  348. ! #endif    TOOLKIT
  349.   
  350.   /*
  351.    *    Mechanism to keep track of the magnifier window.  The problems are,
  352. --- 329,335 ----
  353.   static    Window    top_level;
  354.   static    Window    x_bar, y_bar;
  355.   static    int    x_bgn, x_end, y_bgn, y_end;    /* scrollbar positions */
  356. ! #endif    /* TOOLKIT */
  357.   
  358.   /*
  359.    *    Mechanism to keep track of the magnifier window.  The problems are,
  360. ***************
  361. *** 364,380 ****
  362.   WidgetClass    viewportWidgetClass, widgetClass;
  363.   #ifdef    BUTTONS
  364.   WidgetClass    formWidgetClass, compositeWidgetClass, commandWidgetClass;
  365. ! #endif    BUTTONS
  366. ! #endif    TOOLKIT
  367. ! #else    X10
  368.   short    xdvi_bits[15], xdvi_mask_bits[15];
  369.   Display    *_XlibCurrentDisplay;
  370. ! #endif    X10
  371. ! #endif    lint
  372.   
  373.   #ifdef    sun
  374.   char    *sprintf();
  375. ! #endif    sun
  376.   
  377.   char    *malloc();
  378.   double    atof();
  379. --- 365,381 ----
  380.   WidgetClass    viewportWidgetClass, widgetClass;
  381.   #ifdef    BUTTONS
  382.   WidgetClass    formWidgetClass, compositeWidgetClass, commandWidgetClass;
  383. ! #endif    /* BUTTONS */
  384. ! #endif    /* TOOLKIT */
  385. ! #else    /* X10 */
  386.   short    xdvi_bits[15], xdvi_mask_bits[15];
  387.   Display    *_XlibCurrentDisplay;
  388. ! #endif    /* X10 */
  389. ! #endif    /* lint */
  390.   
  391.   #ifdef    sun
  392.   char    *sprintf();
  393. ! #endif
  394.   
  395.   char    *malloc();
  396.   double    atof();
  397. ***************
  398. *** 412,423 ****
  399.           XDrawLine(DISP, WINDOW(curr), ruleGC,
  400.               fcx - curr.base_x, fcy - curr.base_y,
  401.               tcx - curr.base_x, tcy - curr.base_y);
  402. ! #else X10
  403.           XLine(WINDOW(curr),
  404.               fcx - curr.base_x, fcy - curr.base_y,
  405.               tcx - curr.base_x, tcy - curr.base_y,
  406.               1, 1, ruleGC, GXcopy, AllPlanes);
  407. ! #endif X10
  408.   }
  409.   
  410.   /*
  411. --- 413,424 ----
  412.           XDrawLine(DISP, WINDOW(curr), ruleGC,
  413.               fcx - curr.base_x, fcy - curr.base_y,
  414.               tcx - curr.base_x, tcy - curr.base_y);
  415. ! #else
  416.           XLine(WINDOW(curr),
  417.               fcx - curr.base_x, fcy - curr.base_y,
  418.               tcx - curr.base_x, tcy - curr.base_y,
  419.               1, 1, ruleGC, GXcopy, AllPlanes);
  420. ! #endif
  421.   }
  422.   
  423.   /*
  424. ***************
  425. *** 433,442 ****
  426.   #ifndef X10
  427.           XDrawPoint(DISP, WINDOW(curr), ruleGC,
  428.           cx - curr.base_x, cy - curr.base_y);
  429. ! #else X10
  430.           XPixSet(WINDOW(curr), cx - curr.base_x, cy - curr.base_y,
  431.           1, 1, ruleGC);
  432. ! #endif X10
  433.   }
  434.   
  435.   /*
  436. --- 434,443 ----
  437.   #ifndef X10
  438.           XDrawPoint(DISP, WINDOW(curr), ruleGC,
  439.           cx - curr.base_x, cy - curr.base_y);
  440. ! #else
  441.           XPixSet(WINDOW(curr), cx - curr.base_x, cy - curr.base_y,
  442.           1, 1, ruleGC);
  443. ! #endif
  444.   }
  445.   
  446.   /*
  447. ***************
  448. *** 464,473 ****
  449.   #ifndef X10
  450.           XFillRectangle(DISP, WINDOW(curr), hl ? highGC : ruleGC,
  451.                      x - curr.base_x, y - curr.base_y, w?w:1, h?h:1);
  452. ! #else X10
  453.           XPixSet(WINDOW(curr), x - curr.base_x, y - curr.base_y,
  454.               w?w:1, h?h:1, hl ? highGC : ruleGC);
  455. ! #endif X10
  456.       }
  457.   }
  458.   
  459. --- 465,474 ----
  460.   #ifndef X10
  461.           XFillRectangle(DISP, WINDOW(curr), hl ? highGC : ruleGC,
  462.                      x - curr.base_x, y - curr.base_y, w?w:1, h?h:1);
  463. ! #else
  464.           XPixSet(WINDOW(curr), x - curr.base_x, y - curr.base_y,
  465.               w?w:1, h?h:1, hl ? highGC : ruleGC);
  466. ! #endif
  467.       }
  468.   }
  469.   
  470. ***************
  471. *** 495,505 ****
  472.               0, 0,
  473.               x - curr.base_x, y - curr.base_y,
  474.               bitmap->w, bitmap->h);
  475. ! #else X10
  476.           XBitmapBitsPut(WINDOW(curr), x - curr.base_x, y - curr.base_y,
  477.               bitmap->w, bitmap->h, bitmap->bits,
  478.               foreGC, backpix, NULL, GXfunc, AllPlanes);
  479. ! #endif X10
  480.       }
  481.   }
  482.   
  483. --- 496,506 ----
  484.               0, 0,
  485.               x - curr.base_x, y - curr.base_y,
  486.               bitmap->w, bitmap->h);
  487. ! #else
  488.           XBitmapBitsPut(WINDOW(curr), x - curr.base_x, y - curr.base_y,
  489.               bitmap->w, bitmap->h, bitmap->bits,
  490.               foreGC, backpix, NULL, GXfunc, AllPlanes);
  491. ! #endif
  492.       }
  493.   }
  494.   
  495. ***************
  496. *** 654,661 ****
  497.   
  498.       XtGetValues(vport_widget, arg_wh, XtNumber(arg_wh));
  499.       XtGetValues(clip_widget, arg_wh_clip, XtNumber(arg_wh_clip));
  500. !     x_bar = XtNameToWidget(vport_widget, "horizontal");
  501. !     y_bar = XtNameToWidget(vport_widget, "vertical");
  502.       old_clip_w = clip_w;
  503.               /* we need to do this because */
  504.               /* sizeof(Dimension) != sizeof(int) */
  505. --- 655,665 ----
  506.   
  507.       XtGetValues(vport_widget, arg_wh, XtNumber(arg_wh));
  508.       XtGetValues(clip_widget, arg_wh_clip, XtNumber(arg_wh_clip));
  509. !     /* Note:  widgets may be destroyed but not forgotten */
  510. !     x_bar = page_w <= new_clip_w ? NULL
  511. !         : XtNameToWidget(vport_widget, "horizontal");
  512. !     y_bar = page_h <= new_clip_h ? NULL
  513. !         : XtNameToWidget(vport_widget, "vertical");
  514.       old_clip_w = clip_w;
  515.               /* we need to do this because */
  516.               /* sizeof(Dimension) != sizeof(int) */
  517. ***************
  518. *** 713,721 ****
  519.       keystroke(((int) client_data) & 0xff, ((int) client_data) >> 8,
  520.           (((int) client_data) >> 8) != 0, (XEvent *) NULL);
  521.   }
  522. ! #endif    BUTTONS
  523.   
  524. ! #else    TOOLKIT
  525.   
  526.   /*
  527.    *    brute force scrollbar routines
  528. --- 717,725 ----
  529.       keystroke(((int) client_data) & 0xff, ((int) client_data) >> 8,
  530.           (((int) client_data) >> 8) != 0, (XEvent *) NULL);
  531.   }
  532. ! #endif    /* BUTTONS */
  533.   
  534. ! #else    /* !TOOLKIT */
  535.   
  536.   /*
  537.    *    brute force scrollbar routines
  538. ***************
  539. *** 803,812 ****
  540.           mane.win = (caddr_t) XCreateSimpleWindow(DISP, top_level,
  541.               y_thick, x_thick,
  542.               (unsigned int) clip_w, (unsigned int) clip_h, 0,
  543. !             fore_Pixel, back_Pixel);
  544.           XSelectInput(DPY WINDOW(mane), ExposureMask |
  545.               ButtonPressMask | ButtonMotionMask | ButtonReleaseMask);
  546. ! #else X10
  547.           mane.win = (caddr_t) XCreateWindow(top_level,
  548.               y_thick, x_thick, clip_w, clip_h, 0,
  549.               bdrmap, backmap);
  550. --- 807,816 ----
  551.           mane.win = (caddr_t) XCreateSimpleWindow(DISP, top_level,
  552.               y_thick, x_thick,
  553.               (unsigned int) clip_w, (unsigned int) clip_h, 0,
  554. !             brdr_Pixel, back_Pixel);
  555.           XSelectInput(DPY WINDOW(mane), ExposureMask |
  556.               ButtonPressMask | ButtonMotionMask | ButtonReleaseMask);
  557. ! #else
  558.           mane.win = (caddr_t) XCreateWindow(top_level,
  559.               y_thick, x_thick, clip_w, clip_h, 0,
  560.               bdrmap, backmap);
  561. ***************
  562. *** 813,819 ****
  563.           XSelectInput(WINDOW(mane),  ExposeRegion | ExposeCopy |
  564.               ButtonPressed | ButtonReleased |
  565.               LeftDownMotion | MiddleDownMotion | RightDownMotion);
  566. ! #endif X10
  567.           XMapWindow(DPY WINDOW(mane));
  568.       }
  569.       else
  570. --- 817,823 ----
  571.           XSelectInput(WINDOW(mane),  ExposeRegion | ExposeCopy |
  572.               ButtonPressed | ButtonReleased |
  573.               LeftDownMotion | MiddleDownMotion | RightDownMotion);
  574. ! #endif
  575.           XMapWindow(DPY WINDOW(mane));
  576.       }
  577.       else
  578. ***************
  579. *** 831,846 ****
  580.   #ifndef X10
  581.           x_bar = XCreateSimpleWindow(DISP, top_level, y_thick - 1, -1,
  582.                   (unsigned int) clip_w, BAR_THICK - 1, 1,
  583. !                 fore_Pixel, back_Pixel);
  584.           XSelectInput(DISP, x_bar,
  585.               ExposureMask | ButtonPressMask | Button2MotionMask);
  586. ! #else X10
  587.           x_bar = XCreateWindow(top_level,
  588.                   y_thick - 1, -1, clip_w, BAR_THICK - 1, 1,
  589.                   bdrmap, backmap);
  590.           XSelectInput(x_bar,
  591.               ExposeRegion | ButtonPressed | MiddleDownMotion);
  592. ! #endif X10
  593.           XMapWindow(DPY x_bar);
  594.           }
  595.           x_bgn = mane.base_x * clip_w / page_w;
  596. --- 835,850 ----
  597.   #ifndef X10
  598.           x_bar = XCreateSimpleWindow(DISP, top_level, y_thick - 1, -1,
  599.                   (unsigned int) clip_w, BAR_THICK - 1, 1,
  600. !                 brdr_Pixel, back_Pixel);
  601.           XSelectInput(DISP, x_bar,
  602.               ExposureMask | ButtonPressMask | Button2MotionMask);
  603. ! #else
  604.           x_bar = XCreateWindow(top_level,
  605.                   y_thick - 1, -1, clip_w, BAR_THICK - 1, 1,
  606.                   bdrmap, backmap);
  607.           XSelectInput(x_bar,
  608.               ExposeRegion | ButtonPressed | MiddleDownMotion);
  609. ! #endif
  610.           XMapWindow(DPY x_bar);
  611.           }
  612.           x_bgn = mane.base_x * clip_w / page_w;
  613. ***************
  614. *** 862,877 ****
  615.   #ifndef X10
  616.           y_bar = XCreateSimpleWindow(DISP, top_level, -1, x_thick - 1,
  617.                   BAR_THICK - 1, (unsigned int) clip_h, 1,
  618. !                 fore_Pixel, back_Pixel);
  619.           XSelectInput(DISP, y_bar,
  620.               ExposureMask | ButtonPressMask | Button2MotionMask);
  621. ! #else X10
  622.           y_bar = XCreateWindow(top_level,
  623.                   -1, x_thick - 1, BAR_THICK - 1, clip_h, 1,
  624.                   bdrmap, backmap);
  625.           XSelectInput(y_bar,
  626.               ExposeRegion | ButtonPressed | MiddleDownMotion);
  627. ! #endif X10
  628.           XMapWindow(DPY y_bar);
  629.           }
  630.           y_bgn = mane.base_y * clip_h / page_h;
  631. --- 866,881 ----
  632.   #ifndef X10
  633.           y_bar = XCreateSimpleWindow(DISP, top_level, -1, x_thick - 1,
  634.                   BAR_THICK - 1, (unsigned int) clip_h, 1,
  635. !                 brdr_Pixel, back_Pixel);
  636.           XSelectInput(DISP, y_bar,
  637.               ExposureMask | ButtonPressMask | Button2MotionMask);
  638. ! #else
  639.           y_bar = XCreateWindow(top_level,
  640.                   -1, x_thick - 1, BAR_THICK - 1, clip_h, 1,
  641.                   bdrmap, backmap);
  642.           XSelectInput(y_bar,
  643.               ExposeRegion | ButtonPressed | MiddleDownMotion);
  644. ! #endif
  645.           XMapWindow(DPY y_bar);
  646.           }
  647.           y_bgn = mane.base_y * clip_h / page_h;
  648. ***************
  649. *** 919,925 ****
  650.   #define    window_y 0
  651.   #define    mane_base_x    mane.base_x
  652.   #define    mane_base_y    mane.base_y
  653. ! #endif    TOOLKIT
  654.   
  655.   static    void
  656.   compute_mag_pos(xp, yp)
  657. --- 923,929 ----
  658.   #define    window_y 0
  659.   #define    mane_base_x    mane.base_x
  660.   #define    mane_base_y    mane.base_y
  661. ! #endif    /* TOOLKIT */
  662.   
  663.   static    void
  664.   compute_mag_pos(xp, yp)
  665. ***************
  666. *** 931,940 ****
  667.   #ifndef X10
  668.       if (t > WidthOfScreen(SCRN) - alt.width - 2*MAGBORD)
  669.           t = WidthOfScreen(SCRN) - alt.width - 2*MAGBORD;
  670. ! #else X10
  671. !     if (t > window_w - alt.width - 2*MAGBORD)
  672.           t = window_w - alt.width - 2*MAGBORD;
  673. ! #endif X10
  674.       if (t < 0) t = 0;
  675.       *xp = t;
  676.       t = mag_y + main_y - alt.height/2;
  677. --- 935,944 ----
  678.   #ifndef X10
  679.       if (t > WidthOfScreen(SCRN) - alt.width - 2*MAGBORD)
  680.           t = WidthOfScreen(SCRN) - alt.width - 2*MAGBORD;
  681. ! #else
  682. !     if (t > (int) window_w - alt.width - 2*MAGBORD)
  683.           t = window_w - alt.width - 2*MAGBORD;
  684. ! #endif
  685.       if (t < 0) t = 0;
  686.       *xp = t;
  687.       t = mag_y + main_y - alt.height/2;
  688. ***************
  689. *** 941,950 ****
  690.   #ifndef X10
  691.       if (t > HeightOfScreen(SCRN) - alt.height - 2*MAGBORD)
  692.           t = HeightOfScreen(SCRN) - alt.height - 2*MAGBORD;
  693. ! #else X10
  694. !     if (t > window_h - alt.height - 2*MAGBORD)
  695.           t = window_h - alt.height - 2*MAGBORD;
  696. ! #endif X10
  697.       if (t < 0) t = 0;
  698.       *yp = t;
  699.   }
  700. --- 945,954 ----
  701.   #ifndef X10
  702.       if (t > HeightOfScreen(SCRN) - alt.height - 2*MAGBORD)
  703.           t = HeightOfScreen(SCRN) - alt.height - 2*MAGBORD;
  704. ! #else
  705. !     if (t > (int) window_h - alt.height - 2*MAGBORD)
  706.           t = window_h - alt.height - 2*MAGBORD;
  707. ! #endif
  708.       if (t < 0) t = 0;
  709.       *yp = t;
  710.   }
  711. ***************
  712. *** 955,964 ****
  713.   handle_button(widget, junk, event)
  714.       Widget    widget;
  715.       caddr_t    junk;
  716. ! #else    TOOLKIT
  717.   static    void
  718.   handle_button(event)
  719. ! #endif    TOOLKIT
  720.       XButtonEvent *event;
  721.   {
  722.       int x, y;
  723. --- 959,968 ----
  724.   handle_button(widget, junk, event)
  725.       Widget    widget;
  726.       caddr_t    junk;
  727. ! #else    /* !TOOLKIT */
  728.   static    void
  729.   handle_button(event)
  730. ! #endif    /* TOOLKIT */
  731.       XButtonEvent *event;
  732.   {
  733.       int x, y;
  734. ***************
  735. *** 966,974 ****
  736.       XSetWindowAttributes attr;
  737.   
  738.       alt.width = alt.height = mg_size[event->button - 1];
  739. ! #else X10
  740.       alt.width = alt.height = mg_size[2 - (event->detail & ValueMask)];
  741. ! #endif X10
  742.       if (alt.win != NULL || mane.shrinkfactor == 1 || alt.width <= 0)
  743.           XBell(DISP, 20);
  744.       else {
  745. --- 970,978 ----
  746.       XSetWindowAttributes attr;
  747.   
  748.       alt.width = alt.height = mg_size[event->button - 1];
  749. ! #else
  750.       alt.width = alt.height = mg_size[2 - (event->detail & ValueMask)];
  751. ! #endif
  752.       if (alt.win != NULL || mane.shrinkfactor == 1 || alt.width <= 0)
  753.           XBell(DISP, 20);
  754.       else {
  755. ***************
  756. *** 977,983 ****
  757.   #ifndef X10
  758.           main_x = event->x_root - mag_x;
  759.           main_y = event->y_root - mag_y;
  760. ! #endif X10
  761.           compute_mag_pos(&x, &y);
  762.           alt.base_x = (event->x + mane_base_x) * mane.shrinkfactor -
  763.           alt.width/2;
  764. --- 981,987 ----
  765.   #ifndef X10
  766.           main_x = event->x_root - mag_x;
  767.           main_y = event->y_root - mag_y;
  768. ! #endif
  769.           compute_mag_pos(&x, &y);
  770.           alt.base_x = (event->x + mane_base_x) * mane.shrinkfactor -
  771.           alt.width/2;
  772. ***************
  773. *** 985,991 ****
  774.           alt.height/2;
  775.   #ifndef X10
  776.           attr.save_under = True;
  777. !         attr.border_pixel = fore_Pixel;
  778.           attr.background_pixel = back_Pixel;
  779.           attr.override_redirect = True;
  780.           alt.win = (caddr_t) XCreateWindow(DISP, RootWindowOfScreen(SCRN),
  781. --- 989,995 ----
  782.           alt.height/2;
  783.   #ifndef X10
  784.           attr.save_under = True;
  785. !         attr.border_pixel = brdr_Pixel;
  786.           attr.background_pixel = back_Pixel;
  787.           attr.override_redirect = True;
  788.           alt.win = (caddr_t) XCreateWindow(DISP, RootWindowOfScreen(SCRN),
  789. ***************
  790. *** 995,1006 ****
  791.               CWSaveUnder | CWBorderPixel | CWBackPixel |
  792.               CWOverrideRedirect, &attr);
  793.           XSelectInput(DISP, WINDOW(alt), ExposureMask);
  794. ! #else X10
  795.           alt.win = (caddr_t) XCreateWindow(WINDOW(mane),
  796.               x, y, alt.width, alt.height, MAGBORD,
  797.               bdrmap, backmap);
  798.           XSelectInput(WINDOW(alt), ExposeRegion);
  799. ! #endif X10
  800.           XMapWindow(DPY WINDOW(alt));
  801.           alt_stat = 1;    /* waiting for exposure */
  802.       }
  803. --- 999,1010 ----
  804.               CWSaveUnder | CWBorderPixel | CWBackPixel |
  805.               CWOverrideRedirect, &attr);
  806.           XSelectInput(DISP, WINDOW(alt), ExposureMask);
  807. ! #else
  808.           alt.win = (caddr_t) XCreateWindow(WINDOW(mane),
  809.               x, y, alt.width, alt.height, MAGBORD,
  810.               bdrmap, backmap);
  811.           XSelectInput(WINDOW(alt), ExposeRegion);
  812. ! #endif
  813.           XMapWindow(DPY WINDOW(alt));
  814.           alt_stat = 1;    /* waiting for exposure */
  815.       }
  816. ***************
  817. *** 1020,1026 ****
  818.       main_y = event->y_root - new_mag_y;
  819.       mag_moved = (new_mag_x != mag_x || new_mag_y != mag_y);
  820.   }
  821. ! #endif    TOOLKIT
  822.   
  823.   static    void
  824.   movemag(x, y)
  825. --- 1024,1030 ----
  826.       main_y = event->y_root - new_mag_y;
  827.       mag_moved = (new_mag_x != mag_x || new_mag_y != mag_y);
  828.   }
  829. ! #endif    /* TOOLKIT */
  830.   
  831.   static    void
  832.   movemag(x, y)
  833. ***************
  834. *** 1044,1053 ****
  835.       Widget    widget;
  836.       caddr_t    junk;
  837.       XButtonEvent *event;
  838. ! #else    TOOLKIT
  839.   static    void
  840.   handle_release()
  841. ! #endif    TOOLKIT
  842.   {
  843.       if (alt.win)
  844.           if (alt_stat) alt_stat = -1;    /* destroy upon expose */
  845. --- 1048,1057 ----
  846.       Widget    widget;
  847.       caddr_t    junk;
  848.       XButtonEvent *event;
  849. ! #else    /* !TOOLKIT */
  850.   static    void
  851.   handle_release()
  852. ! #endif    /* TOOLKIT */
  853.   {
  854.       if (alt.win)
  855.           if (alt_stat) alt_stat = -1;    /* destroy upon expose */
  856. ***************
  857. *** 1078,1084 ****
  858.           alt_stat = 0;
  859.       expose(windowrec, event->x, event->y, event->width, event->height);
  860.   }
  861. ! #endif    TOOLKIT
  862.   
  863.   /* |||
  864.    *    Currently the event handler does not coordinate XCopyArea requests
  865. --- 1082,1088 ----
  866.           alt_stat = 0;
  867.       expose(windowrec, event->x, event->y, event->width, event->height);
  868.   }
  869. ! #endif    /* TOOLKIT */
  870.   
  871.   /* |||
  872.    *    Currently the event handler does not coordinate XCopyArea requests
  873. ***************
  874. *** 1095,1102 ****
  875.   #define    XMOTION(ev)    (ev).xmotion
  876.   #define    XBUTTON(ev)    (ev).xbutton
  877.   #define    ISEXPOSE(ev)    ((ev).type == Expose)
  878. ! #endif    TOOLKIT
  879. ! #else X10
  880.   #define    XANY(ev)    (ev)
  881.   #define    XCONFIG(ev)    (*((XExposeEvent *) &(ev)))
  882.   #define    XEXPOSE(ev)    (*((XExposeEvent *) &(ev)))
  883. --- 1099,1106 ----
  884.   #define    XMOTION(ev)    (ev).xmotion
  885.   #define    XBUTTON(ev)    (ev).xbutton
  886.   #define    ISEXPOSE(ev)    ((ev).type == Expose)
  887. ! #endif    /* TOOLKIT */
  888. ! #else    /* X10 */
  889.   #define    XANY(ev)    (ev)
  890.   #define    XCONFIG(ev)    (*((XExposeEvent *) &(ev)))
  891.   #define    XEXPOSE(ev)    (*((XExposeEvent *) &(ev)))
  892. ***************
  893. *** 1110,1116 ****
  894.   #define    ButtonPress    ButtonPressed
  895.   #define    ButtonRelease    ButtonReleased
  896.   #define    KeyPress    KeyPressed
  897. ! #endif X10
  898.   
  899.   static    void
  900.   keystroke(ch, number0, arg0, eventp)
  901. --- 1114,1120 ----
  902.   #define    ButtonPress    ButtonPressed
  903.   #define    ButtonRelease    ButtonReleased
  904.   #define    KeyPress    KeyPressed
  905. ! #endif    /* X10 */
  906.   
  907.   static    void
  908.   keystroke(ch, number0, arg0, eventp)
  909. ***************
  910. *** 1122,1128 ****
  911.       int    next_page;
  912.   #ifndef X10
  913.       Window    ww;
  914. ! #endif X10
  915.   
  916.       next_page = current_page;
  917.       switch (ch) {
  918. --- 1126,1132 ----
  919.       int    next_page;
  920.   #ifndef X10
  921.       Window    ww;
  922. ! #endif
  923.   
  924.       next_page = current_page;
  925.       switch (ch) {
  926. ***************
  927. *** 1186,1192 ****
  928.           case 'c':
  929.           center(eventp->xkey.x, eventp->xkey.y);
  930.           return;
  931. ! #else    TOOLKIT
  932.           case 'l':
  933.           if (mane.base_x <= 0) goto bad;
  934.           scrollmane(mane.base_x - 2 * clip_w / 3, mane.base_y);
  935. --- 1190,1196 ----
  936.           case 'c':
  937.           center(eventp->xkey.x, eventp->xkey.y);
  938.           return;
  939. ! #else    /* !TOOLKIT */
  940.           case 'l':
  941.           if (mane.base_x <= 0) goto bad;
  942.           scrollmane(mane.base_x - 2 * clip_w / 3, mane.base_y);
  943. ***************
  944. *** 1211,1221 ****
  945.   #ifndef X10
  946.           XWarpPointer(DISP, None, None, 0, 0, 0, 0,
  947.               clip_w/2 - XKEY(*eventp).x, clip_h/2 - XKEY(*eventp).y);
  948. ! #else X10
  949.           XWarpMouse(WINDOW(mane), clip_w/2, clip_h/2, GXcopy);
  950. ! #endif X10
  951.           return;
  952. ! #endif    TOOLKIT
  953.   
  954.   #ifndef X10
  955.           case 'M':
  956. --- 1215,1225 ----
  957.   #ifndef X10
  958.           XWarpPointer(DISP, None, None, 0, 0, 0, 0,
  959.               clip_w/2 - XKEY(*eventp).x, clip_h/2 - XKEY(*eventp).y);
  960. ! #else
  961.           XWarpMouse(WINDOW(mane), clip_w/2, clip_h/2, GXcopy);
  962. ! #endif
  963.           return;
  964. ! #endif    /* TOOLKIT */
  965.   
  966.   #ifndef X10
  967.           case 'M':
  968. ***************
  969. *** 1230,1241 ****
  970.               BitmapUnit(DISP), BitmapBitOrder(DISP),
  971.               ImageByteOrder(DISP));
  972.           return;
  973. ! #else X10
  974.           case 'M':
  975. !         home_x = (XKEY(*eventp).x + mane.base_x) * mane.shrinkfactor;
  976. !         home_y = (XKEY(*eventp).y + mane.base_y) * mane.shrinkfactor;
  977.           return;
  978. ! #endif X10
  979.           case 's':
  980.           if (!arg0) {
  981.               int temp;
  982. --- 1234,1247 ----
  983.               BitmapUnit(DISP), BitmapBitOrder(DISP),
  984.               ImageByteOrder(DISP));
  985.           return;
  986. ! #else
  987.           case 'M':
  988. !         home_x = (XKEY(*eventp).x - (y_bar ? BAR_THICK : 0)
  989. !             + mane.base_x) * mane.shrinkfactor;
  990. !         home_y = (XKEY(*eventp).y - (x_bar ? BAR_THICK : 0)
  991. !             + mane.base_y) * mane.shrinkfactor;
  992.           return;
  993. ! #endif
  994.           case 's':
  995.           if (!arg0) {
  996.               int temp;
  997. ***************
  998. *** 1270,1279 ****
  999.               XEvent event;
  1000.               XPeekEvent(DISP, &event);
  1001.           }
  1002. ! #else    TOOLKIT
  1003.           reconfig();
  1004.           home(False);
  1005. ! #endif    TOOLKIT
  1006.           break;
  1007.           case 'S':
  1008.           if (!arg0) goto bad;
  1009. --- 1276,1285 ----
  1010.               XEvent event;
  1011.               XPeekEvent(DISP, &event);
  1012.           }
  1013. ! #else    /* TOOLKIT */
  1014.           reconfig();
  1015.           home(False);
  1016. ! #endif    /* TOOLKIT */
  1017.           break;
  1018.           case 'S':
  1019.           if (!arg0) goto bad;
  1020. ***************
  1021. *** 1307,1313 ****
  1022.   
  1023.   #ifndef X10
  1024.   #define    TRSIZE    100
  1025. ! #endif X10
  1026.   static    void
  1027.   read_events(wait)
  1028.       Boolean    wait;
  1029. --- 1313,1319 ----
  1030.   
  1031.   #ifndef X10
  1032.   #define    TRSIZE    100
  1033. ! #endif    /* X10 */
  1034.   static    void
  1035.   read_events(wait)
  1036.       Boolean    wait;
  1037. ***************
  1038. *** 1318,1324 ****
  1039.       XEvent    event;
  1040.   #ifndef X10
  1041.       char    trbuf[TRSIZE];
  1042. ! #endif X10
  1043.       char    *string;
  1044.       int    nbytes;
  1045.   
  1046. --- 1324,1330 ----
  1047.       XEvent    event;
  1048.   #ifndef X10
  1049.       char    trbuf[TRSIZE];
  1050. ! #endif
  1051.       char    *string;
  1052.       int    nbytes;
  1053.   
  1054. ***************
  1055. *** 1353,1359 ****
  1056.           nbytes = XLookupString(&event.xkey, string, TRSIZE, NULL, NULL);
  1057.           if (nbytes > 1) ch = '?';
  1058.           if (nbytes != 0) ch = *string;
  1059. ! #else    TOOLKIT
  1060.   
  1061.           XNextEvent(DPY &event);
  1062.           if (XANY(event).window == WINDOW(mane) ||
  1063. --- 1359,1365 ----
  1064.           nbytes = XLookupString(&event.xkey, string, TRSIZE, NULL, NULL);
  1065.           if (nbytes > 1) ch = '?';
  1066.           if (nbytes != 0) ch = *string;
  1067. ! #else    /* !TOOLKIT */
  1068.   
  1069.           XNextEvent(DPY &event);
  1070.           if (XANY(event).window == WINDOW(mane) ||
  1071. ***************
  1072. *** 1375,1383 ****
  1073.           switch (event.type) {
  1074.   #ifndef X10
  1075.           case GraphicsExpose:
  1076. ! #else X10
  1077.           case ExposeWindow:
  1078. ! #endif X10
  1079.           case Expose:
  1080.   #ifdef X10
  1081.               if (XEXPOSE(event).detail & ExposeCopy)
  1082. --- 1381,1389 ----
  1083.           switch (event.type) {
  1084.   #ifndef X10
  1085.           case GraphicsExpose:
  1086. ! #else
  1087.           case ExposeWindow:
  1088. ! #endif
  1089.           case Expose:
  1090.   #ifdef X10
  1091.               if (XEXPOSE(event).detail & ExposeCopy)
  1092. ***************
  1093. *** 1384,1395 ****
  1094.               ClearArea(event.window,
  1095.                   XEXPOSE(event).x, XEXPOSE(event).y,
  1096.                   XEXPOSE(event).width, XEXPOSE(event).height);
  1097. ! #endif X10
  1098.               expose(wr, XEXPOSE(event).x, XEXPOSE(event).y,
  1099.               XEXPOSE(event).width, XEXPOSE(event).height);
  1100.   #ifdef X10
  1101.           case ExposeCopy:    /* throw away junk event */
  1102. ! #endif X10
  1103.               break;
  1104.   
  1105.           case MotionNotify:
  1106. --- 1390,1401 ----
  1107.               ClearArea(event.window,
  1108.                   XEXPOSE(event).x, XEXPOSE(event).y,
  1109.                   XEXPOSE(event).width, XEXPOSE(event).height);
  1110. ! #endif
  1111.               expose(wr, XEXPOSE(event).x, XEXPOSE(event).y,
  1112.               XEXPOSE(event).width, XEXPOSE(event).height);
  1113.   #ifdef X10
  1114.           case ExposeCopy:    /* throw away junk event */
  1115. ! #endif
  1116.               break;
  1117.   
  1118.           case MotionNotify:
  1119. ***************
  1120. *** 1397,1403 ****
  1121.           case LeftDownMotion:
  1122.           case MiddleDownMotion:
  1123.           case RightDownMotion:
  1124. ! #endif X10
  1125.               new_mag_x = XMOTION(event).x;
  1126.               new_mag_y = XMOTION(event).y;
  1127.               mag_moved = (new_mag_x != mag_x || new_mag_y != mag_y);
  1128. --- 1403,1409 ----
  1129.           case LeftDownMotion:
  1130.           case MiddleDownMotion:
  1131.           case RightDownMotion:
  1132. ! #endif
  1133.               new_mag_x = XMOTION(event).x;
  1134.               new_mag_y = XMOTION(event).y;
  1135.               mag_moved = (new_mag_x != mag_x || new_mag_y != mag_y);
  1136. ***************
  1137. *** 1421,1430 ****
  1138.               mane.base_y);
  1139.   #ifndef X10
  1140.           else switch (XBUTTON(event).button)
  1141. ! #else X10
  1142.           else if (event.type == ButtonPress)
  1143.               switch (3 - (XBUTTON(event).detail & ValueMask))
  1144. ! #endif X10
  1145.           {
  1146.               case 1:
  1147.               scrollmane(mane.base_x + XBUTTON(event).x, mane.base_y);
  1148. --- 1427,1436 ----
  1149.               mane.base_y);
  1150.   #ifndef X10
  1151.           else switch (XBUTTON(event).button)
  1152. ! #else
  1153.           else if (event.type == ButtonPress)
  1154.               switch (3 - (XBUTTON(event).detail & ValueMask))
  1155. ! #endif
  1156.           {
  1157.               case 1:
  1158.               scrollmane(mane.base_x + XBUTTON(event).x, mane.base_y);
  1159. ***************
  1160. *** 1446,1455 ****
  1161.               XMOTION(event).y * page_h / clip_h);
  1162.   #ifndef X10
  1163.           else switch (XBUTTON(event).button)
  1164. ! #else X10
  1165.           else if (event.type == ButtonPress)
  1166.               switch (3 - (XBUTTON(event).detail & ValueMask))
  1167. ! #endif X10
  1168.           {
  1169.               case 1:
  1170.               scrollmane(mane.base_x, mane.base_y + XBUTTON(event).y);
  1171. --- 1452,1461 ----
  1172.               XMOTION(event).y * page_h / clip_h);
  1173.   #ifndef X10
  1174.           else switch (XBUTTON(event).button)
  1175. ! #else
  1176.           else if (event.type == ButtonPress)
  1177.               switch (3 - (XBUTTON(event).detail & ValueMask))
  1178. ! #endif
  1179.           {
  1180.               case 1:
  1181.               scrollmane(mane.base_x, mane.base_y + XBUTTON(event).y);
  1182. ***************
  1183. *** 1485,1491 ****
  1184.               home(False);
  1185.               }
  1186.               break;
  1187. ! #endif X10
  1188.   
  1189.           case KeyPress:
  1190.   #ifndef X10
  1191. --- 1491,1497 ----
  1192.               home(False);
  1193.               }
  1194.               break;
  1195. ! #endif
  1196.   
  1197.           case KeyPress:
  1198.   #ifndef X10
  1199. ***************
  1200. *** 1492,1505 ****
  1201.               string = trbuf;
  1202.               nbytes = XLookupString(&event.xkey, string, TRSIZE, NULL,
  1203.               NULL);
  1204. ! #else X10
  1205.               string = XLookupMapping(&event, &nbytes);
  1206. ! #endif X10
  1207.               if (nbytes > 1) ch = '?';
  1208.               if (nbytes != 0) ch = *string;
  1209.               break;
  1210.           }
  1211. ! #endif    TOOLKIT
  1212.           if (ch == '\0') continue;
  1213.           if (ch >= '0' && ch <= '9') {
  1214.           arg = True;
  1215. --- 1498,1511 ----
  1216.               string = trbuf;
  1217.               nbytes = XLookupString(&event.xkey, string, TRSIZE, NULL,
  1218.               NULL);
  1219. ! #else
  1220.               string = XLookupMapping(&event, &nbytes);
  1221. ! #endif
  1222.               if (nbytes > 1) ch = '?';
  1223.               if (nbytes != 0) ch = *string;
  1224.               break;
  1225.           }
  1226. ! #endif    /* TOOLKIT */
  1227.           if (ch == '\0') continue;
  1228.           if (ch >= '0' && ch <= '9') {
  1229.           arg = True;
  1230. ***************
  1231. *** 1528,1534 ****
  1232.       char    *errtext;
  1233.   #ifdef X10
  1234.       static FontInfo *font = 0;
  1235. ! #endif X10
  1236.   
  1237.       curr = *windowrec;
  1238.       min_x = curr.min_x + curr.base_x;
  1239. --- 1534,1540 ----
  1240.       char    *errtext;
  1241.   #ifdef X10
  1242.       static FontInfo *font = 0;
  1243. ! #endif
  1244.   
  1245.       curr = *windowrec;
  1246.       min_x = curr.min_x + curr.base_x;
  1247. ***************
  1248. *** 1548,1558 ****
  1249.           XDrawString(DISP, WINDOW(mane), foreGC,
  1250.           5 - window_x, 5 + X11HEIGHT - window_y,
  1251.           errtext, strlen(errtext));
  1252. ! #else X10
  1253.           if (!font) font = XOpenFont(X10FONT);
  1254.           XTextMask(WINDOW(mane), 5, 5 + X10HEIGHT, errtext, strlen(errtext),
  1255.           font->id, foreGC);
  1256. ! #endif X10
  1257.           if (dvi_file) {
  1258.           Fclose(dvi_file);
  1259.           dvi_file = NULL;
  1260. --- 1554,1564 ----
  1261.           XDrawString(DISP, WINDOW(mane), foreGC,
  1262.           5 - window_x, 5 + X11HEIGHT - window_y,
  1263.           errtext, strlen(errtext));
  1264. ! #else
  1265.           if (!font) font = XOpenFont(X10FONT);
  1266.           XTextMask(WINDOW(mane), 5, 5 + X10HEIGHT, errtext, strlen(errtext),
  1267.           font->id, foreGC);
  1268. ! #endif
  1269.           if (dvi_file) {
  1270.           Fclose(dvi_file);
  1271.           dvi_file = NULL;
  1272. ***************
  1273. *** 1610,1618 ****
  1274.       event_freq = -1;    /* forget Plan B */
  1275.   }
  1276.   
  1277.   static    void
  1278.   enable_intr() {
  1279. - #ifdef    HAS_SIGIO
  1280.       int    socket    = ConnectionNumber(DISP);
  1281.       if (!isatty(0)) {
  1282.           puts("trying...");
  1283. --- 1616,1624 ----
  1284.       event_freq = -1;    /* forget Plan B */
  1285.   }
  1286.   
  1287. + #ifdef    HAS_SIGIO
  1288.   static    void
  1289.   enable_intr() {
  1290.       int    socket    = ConnectionNumber(DISP);
  1291.       if (!isatty(0)) {
  1292.           puts("trying...");
  1293. ***************
  1294. *** 1622,1629 ****
  1295.       (void) signal(SIGIO, handle_intr);
  1296.       (void) fcntl(socket, F_SETOWN, getpid());
  1297.       (void) fcntl(socket, F_SETFL, fcntl(socket, F_GETFL, 0) | FASYNC);
  1298. - #endif    HAS_SIGIO
  1299.   }
  1300.   
  1301.   static
  1302.   do_pages()
  1303. --- 1628,1635 ----
  1304.       (void) signal(SIGIO, handle_intr);
  1305.       (void) fcntl(socket, F_SETOWN, getpid());
  1306.       (void) fcntl(socket, F_SETFL, fcntl(socket, F_GETFL, 0) | FASYNC);
  1307.   }
  1308. + #endif    /* HAS_SIGIO */
  1309.   
  1310.   static
  1311.   do_pages()
  1312. ***************
  1313. *** 1631,1647 ****
  1314.       if (debug & DBG_BATCH) {
  1315.   #ifdef    TOOLKIT
  1316.           while (mane.min_x == MAXDIM) read_events(True);
  1317. ! #else    TOOLKIT
  1318.           while (mane.min_x == MAXDIM)
  1319.           if (setjmp(canit_env)) break;
  1320.           else read_events(True);
  1321. ! #endif    TOOLKIT
  1322.           for (current_page = 0; current_page < total_pages; ++current_page)
  1323.           redraw_page();
  1324.           exit(0);
  1325.       }
  1326.       else {    /* normal operation */
  1327.           enable_intr();
  1328.           (void) setjmp(canit_env);
  1329.           for (;;) {
  1330.           if (mane.win) SetCursor(ready_cursor);
  1331. --- 1637,1655 ----
  1332.       if (debug & DBG_BATCH) {
  1333.   #ifdef    TOOLKIT
  1334.           while (mane.min_x == MAXDIM) read_events(True);
  1335. ! #else    /* !TOOLKIT */
  1336.           while (mane.min_x == MAXDIM)
  1337.           if (setjmp(canit_env)) break;
  1338.           else read_events(True);
  1339. ! #endif    /* TOOLKIT */
  1340.           for (current_page = 0; current_page < total_pages; ++current_page)
  1341.           redraw_page();
  1342.           exit(0);
  1343.       }
  1344.       else {    /* normal operation */
  1345. + #ifdef    HAS_SIGIO
  1346.           enable_intr();
  1347. + #endif
  1348.           (void) setjmp(canit_env);
  1349.           for (;;) {
  1350.           if (mane.win) SetCursor(ready_cursor);
  1351. ***************
  1352. *** 1672,1695 ****
  1353.   static
  1354.   usage() {
  1355.   #ifndef X10
  1356.       fputs("\
  1357. ! Usage: xdvi [+[<page>]] [-s <shrink>] [-S <density>] [-p <pixels>] [-l] [-rv]\n\
  1358.       [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  1359.   [-cr <color>]\n\
  1360. !     [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>]\n\
  1361.       [-paper <papertype>] [-mgs[n] <size>] [-altfont <font>]\n\
  1362. !     [#<geometry>] [-geometry <geometry>] [-display <host:display>]\n\
  1363. !     [-copy] [-thorough] dvi_file\n", stderr);
  1364. ! #else X10
  1365.       fputs("\
  1366. - Usage: xdvi [+[<page>]] [-s <shrink>] [-S <density>] [-p <pixels>] [-l] [-rv]\n\
  1367.       [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  1368.   [-cr <color>]\n\
  1369. !     [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>]\n\
  1370.       [-paper <papertype>] [-mgs[n] <size>] [-altfont <font>]\n\
  1371. !     [-geometry <geometry> | =<geometry>]\n\
  1372.       [-display <host:display> | <host:display>] dvi_file\n", stderr);
  1373. ! #endif X10
  1374.       exit(1);
  1375.   }
  1376.   
  1377. --- 1680,1720 ----
  1378.   static
  1379.   usage() {
  1380.   #ifndef X10
  1381. + #ifndef    VMS
  1382.       fputs("\
  1383. ! Usage: xdvi [+[<page>]] [-s <shrink>] [-S <density>] [-p <pixels>] [-l]\n\
  1384. !     [-paper <papertype>] [-mgs[n] <size>] [-altfont <font>]\n\
  1385. !     [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>] [-rv]\
  1386. ! \n\
  1387.       [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  1388.   [-cr <color>]\n\
  1389. !     [-bw <width>] [-geometry <geometry>] [-icongeometry <geometry>]\n\
  1390. !     [-iconic] [-display <host:display>] [-copy] [-thorough] dvi_file\n",
  1391. !     stderr);
  1392. ! #else    /* VMS */
  1393. !     fputs("\
  1394. ! Usage: xdvi [+[<page>]] [-s <shrink>] [-density <%>] [-p <pixels>] [-l]\n\
  1395.       [-paper <papertype>] [-mgs[n] <size>] [-altfont <font>]\n\
  1396. !     [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>] [-rv]\
  1397. ! \n", stderr);
  1398.       fputs("\
  1399.       [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  1400.   [-cr <color>]\n\
  1401. !     [-bw <width>] [-geometry <geometry>] [-icongeometry <geometry>]\n\
  1402. !     [-iconic] [-display <host:display>] [-copy] [-thorough] dvi_file\n",
  1403. !     stderr);
  1404. ! #endif    /* VMS */
  1405. ! #else    /* X10 */
  1406. !     fputs("\
  1407. ! Usage: xdvi [+[<page>]] [-s <shrink>] [-S <density>] [-p <pixels>] [-l]\n\
  1408.       [-paper <papertype>] [-mgs[n] <size>] [-altfont <font>]\n\
  1409. !     [-margins <inches>] [-sidemargin <inches>] [-topmargin <inches>] [-rv]\
  1410. ! \n\
  1411. !     [-fg <color>] [-bg <color>] [-hl <color>] [-bd <color>] \
  1412. ! [-cr <color>]\n\
  1413. !     [-bw <width>] [-geometry <geometry> | =<geometry>]\n\
  1414.       [-display <host:display> | <host:display>] dvi_file\n", stderr);
  1415. ! #endif    /* X10 */
  1416.       exit(1);
  1417.   }
  1418.   
  1419. ***************
  1420. *** 1701,1715 ****
  1421.   static    char    *icon_geometry;
  1422.   static    Boolean    copy    = 2;
  1423.   static    Boolean    thorough;
  1424. ! #endif X10
  1425.   
  1426.   #ifdef    TOOLKIT
  1427.   
  1428.   static    XrmOptionDescRec    options[] = {
  1429.   {"-d",        ".debugLevel",    XrmoptionSepArg,    (caddr_t) NULL},
  1430. - {"+",        ".gotoPage",    XrmoptionStickyArg,    (caddr_t) NULL},
  1431.   {"-s",        ".shrinkFactor", XrmoptionSepArg,    (caddr_t) NULL},
  1432.   {"-S",        ".densityPercent", XrmoptionSepArg,    (caddr_t) NULL},
  1433.   {"-p",        ".pixelsPerInch", XrmoptionSepArg,    (caddr_t) NULL},
  1434.   {"-margins",    ".margins",    XrmoptionSepArg,    (caddr_t) NULL},
  1435.   {"-sidemargin",    ".sideMargin",    XrmoptionSepArg,    (caddr_t) NULL},
  1436. --- 1726,1742 ----
  1437.   static    char    *icon_geometry;
  1438.   static    Boolean    copy    = 2;
  1439.   static    Boolean    thorough;
  1440. ! #endif    /* X10 */
  1441.   
  1442.   #ifdef    TOOLKIT
  1443.   
  1444.   static    XrmOptionDescRec    options[] = {
  1445.   {"-d",        ".debugLevel",    XrmoptionSepArg,    (caddr_t) NULL},
  1446.   {"-s",        ".shrinkFactor", XrmoptionSepArg,    (caddr_t) NULL},
  1447. + #ifndef    VMS
  1448.   {"-S",        ".densityPercent", XrmoptionSepArg,    (caddr_t) NULL},
  1449. + #endif
  1450. + {"-density",    ".densityPercent", XrmoptionSepArg,    (caddr_t) NULL},
  1451.   {"-p",        ".pixelsPerInch", XrmoptionSepArg,    (caddr_t) NULL},
  1452.   {"-margins",    ".margins",    XrmoptionSepArg,    (caddr_t) NULL},
  1453.   {"-sidemargin",    ".sideMargin",    XrmoptionSepArg,    (caddr_t) NULL},
  1454. ***************
  1455. *** 1724,1730 ****
  1456.   {"-background",    ".background",    XrmoptionSepArg,    (caddr_t) NULL},
  1457.   {"-hl",        ".highlight",    XrmoptionSepArg,    (caddr_t) NULL},
  1458.   {"-cr",        ".cursorColor",    XrmoptionSepArg,    (caddr_t) NULL},
  1459. ! {"#",        ".iconGeometry",XrmoptionStickyArg,     (caddr_t) NULL},
  1460.   {"-copy",    ".copy",    XrmoptionNoArg,        (caddr_t) "on"},
  1461.   {"+copy",    ".copy",    XrmoptionNoArg,        (caddr_t) "off"},
  1462.   {"-thorough",    ".thorough",    XrmoptionNoArg,        (caddr_t) "on"},
  1463. --- 1751,1757 ----
  1464.   {"-background",    ".background",    XrmoptionSepArg,    (caddr_t) NULL},
  1465.   {"-hl",        ".highlight",    XrmoptionSepArg,    (caddr_t) NULL},
  1466.   {"-cr",        ".cursorColor",    XrmoptionSepArg,    (caddr_t) NULL},
  1467. ! {"-icongeometry",".iconGeometry",XrmoptionSepArg,    (caddr_t) NULL},
  1468.   {"-copy",    ".copy",    XrmoptionNoArg,        (caddr_t) "on"},
  1469.   {"+copy",    ".copy",    XrmoptionNoArg,        (caddr_t) "off"},
  1470.   {"-thorough",    ".thorough",    XrmoptionNoArg,        (caddr_t) "on"},
  1471. ***************
  1472. *** 1740,1747 ****
  1473.   static    XtResource    resources[] = {
  1474.   {"debugLevel", "DebugLevel", XtRString, sizeof(char *),
  1475.     (Cardinal) &debug_arg, XtRString, NULL},
  1476. - {"gotoPage", "GotoPage", XtRString, sizeof(char *),
  1477. -   (Cardinal) &curr_page, XtRString, NULL},
  1478.   {"shrinkFactor", "ShrinkFactor", XtRInt, sizeof(int),
  1479.     (Cardinal) &shrink_factor, XtRInt, (caddr_t) &shrink_factor},
  1480.   {"densityPercent", "DensityPercent", XtRInt, sizeof(int),
  1481. --- 1767,1772 ----
  1482. ***************
  1483. *** 1770,1775 ****
  1484. --- 1795,1804 ----
  1485.     (Cardinal)&back_Pixel, XtRPixel, (caddr_t) &back_Pixel},
  1486.   {"background", "Background", XtRString, sizeof(char *),
  1487.     (Cardinal)&back_color, XtRString, NULL},
  1488. + {"borderColor", "BorderColor", XtRPixel, sizeof(Pixel),
  1489. +   (Cardinal)&brdr_Pixel, XtRPixel, (caddr_t) &brdr_Pixel},
  1490. + {"borderColor", "BorderColor", XtRString, sizeof(char *),
  1491. +   (Cardinal)&brdr_color, XtRString, NULL},
  1492.   {"highlight", "Highlight", XtRPixel, sizeof(Pixel),
  1493.     (Cardinal)&hl_Pixel, XtRPixel, (caddr_t) &hl_Pixel},
  1494.   {"highlight", "Highlight", XtRString, sizeof(char *),
  1495. ***************
  1496. *** 1810,1822 ****
  1497.       {XtNinput,    (XtArgVal) True},
  1498.   };
  1499.   
  1500. ! #else    TOOLKIT
  1501.   
  1502.   static    char    *display;
  1503.   static    char    *geometry;
  1504. - #ifdef X10
  1505. - static    char    *brdr_color;
  1506. - #endif X10
  1507.   
  1508.   #ifndef X10
  1509.   static    Boolean    iconic    = False;
  1510. --- 1839,1848 ----
  1511.       {XtNinput,    (XtArgVal) True},
  1512.   };
  1513.   
  1514. ! #else    /* !TOOLKIT */
  1515.   
  1516.   static    char    *display;
  1517.   static    char    *geometry;
  1518.   
  1519.   #ifndef X10
  1520.   static    Boolean    iconic    = False;
  1521. ***************
  1522. *** 1846,1852 ****
  1523.       }
  1524.       return color.pixel;
  1525.   }
  1526. ! #endif X10
  1527.   
  1528.   static    struct option {
  1529.       char    *name;
  1530. --- 1872,1878 ----
  1531.       }
  1532.       return color.pixel;
  1533.   }
  1534. ! #endif    /* X10 */
  1535.   
  1536.   static    struct option {
  1537.       char    *name;
  1538. ***************
  1539. *** 1861,1866 ****
  1540. --- 1887,1893 ----
  1541.   {"+",        NULL,        StickyArg, StringArg,    (caddr_t) &curr_page},
  1542.   {"-s",        "shrinkFactor", SepArg, NumberArg,    (caddr_t) &shrink_factor},
  1543.   {"-S",        "densityPercent", SepArg, NumberArg,    (caddr_t) &density},
  1544. + {"-density",    NULL,        SepArg, NumberArg,    (caddr_t) &density},
  1545.   {"-p",        "pixelsPerInch", SepArg, NumberArg,    (caddr_t) &pixels_per_inch},
  1546.   {"-margins",    "margins",    SepArg,    StringArg,    (caddr_t) &margins},
  1547.   {"-sidemargin",    "sideMargin",    SepArg,    StringArg,    (caddr_t) &sidemargin},
  1548. ***************
  1549. *** 1877,1891 ****
  1550.   {"-foreground",    NULL,        SepArg,    StringArg,    (caddr_t) &fore_color},
  1551.   {"-bg",        "background",    SepArg,    StringArg,    (caddr_t) &back_color},
  1552.   {"-background",    NULL,        SepArg,    StringArg,    (caddr_t) &back_color},
  1553. - {"-hl",        "highlight",    SepArg,    StringArg,    (caddr_t) &high_color},
  1554. - #ifdef X10
  1555.   {"-bd",        "borderColor",    SepArg,    StringArg,    (caddr_t) &brdr_color},
  1556. ! #endif X10
  1557.   {"-cr",        "cursorColor",    SepArg,    StringArg,    (caddr_t) &curs_color},
  1558.   {"-geometry",    "geometry",    SepArg,    StringArg,    (caddr_t) &geometry},
  1559.   {"=",        NULL,        StickyArg, StringArg,    (caddr_t) &geometry},
  1560. ! #ifndef X10
  1561. ! {"#",        "iconGeometry",    StickyArg, StringArg,    (caddr_t) &icon_geometry},
  1562.   {"-iconic",    "iconic",    TrueArg, BooleanArg,    (caddr_t) &iconic},
  1563.   {"+iconic",    NULL,        FalseArg, BooleanArg,    (caddr_t) &iconic},
  1564.   {"-copy",    "copy",        TrueArg, BooleanArg,    (caddr_t) ©},
  1565. --- 1904,1919 ----
  1566.   {"-foreground",    NULL,        SepArg,    StringArg,    (caddr_t) &fore_color},
  1567.   {"-bg",        "background",    SepArg,    StringArg,    (caddr_t) &back_color},
  1568.   {"-background",    NULL,        SepArg,    StringArg,    (caddr_t) &back_color},
  1569.   {"-bd",        "borderColor",    SepArg,    StringArg,    (caddr_t) &brdr_color},
  1570. ! {"-bordercolor",NULL,        SepArg,    StringArg,    (caddr_t) &brdr_color},
  1571. ! {"-hl",        "highlight",    SepArg,    StringArg,    (caddr_t) &high_color},
  1572.   {"-cr",        "cursorColor",    SepArg,    StringArg,    (caddr_t) &curs_color},
  1573.   {"-geometry",    "geometry",    SepArg,    StringArg,    (caddr_t) &geometry},
  1574. + #ifdef    X10
  1575.   {"=",        NULL,        StickyArg, StringArg,    (caddr_t) &geometry},
  1576. ! #endif
  1577. ! #ifndef    X10
  1578. ! {"-icongeometry","iconGeometry",StickyArg, StringArg,    (caddr_t) &icon_geometry},
  1579.   {"-iconic",    "iconic",    TrueArg, BooleanArg,    (caddr_t) &iconic},
  1580.   {"+iconic",    NULL,        FalseArg, BooleanArg,    (caddr_t) &iconic},
  1581.   {"-copy",    "copy",        TrueArg, BooleanArg,    (caddr_t) ©},
  1582. ***************
  1583. *** 1892,1898 ****
  1584.   {"+copy",    NULL,        FalseArg, BooleanArg,    (caddr_t) ©},
  1585.   {"-thorough",    "thorough",    TrueArg, BooleanArg,    (caddr_t) &thorough},
  1586.   {"+thorough",    NULL,        FalseArg, BooleanArg,    (caddr_t) &thorough},
  1587. ! #endif X10
  1588.   {"-mgs",    NULL,        SepArg, NumberArg,    (caddr_t) &mg_size[0]},
  1589.   {"-mgs1",    "magnifierSize1",SepArg, NumberArg,    (caddr_t) &mg_size[0]},
  1590.   {"-mgs2",    "magnifierSize2",SepArg, NumberArg,    (caddr_t) &mg_size[1]},
  1591. --- 1920,1926 ----
  1592.   {"+copy",    NULL,        FalseArg, BooleanArg,    (caddr_t) ©},
  1593.   {"-thorough",    "thorough",    TrueArg, BooleanArg,    (caddr_t) &thorough},
  1594.   {"+thorough",    NULL,        FalseArg, BooleanArg,    (caddr_t) &thorough},
  1595. ! #endif    /* X10 */
  1596.   {"-mgs",    NULL,        SepArg, NumberArg,    (caddr_t) &mg_size[0]},
  1597.   {"-mgs1",    "magnifierSize1",SepArg, NumberArg,    (caddr_t) &mg_size[0]},
  1598.   {"-mgs2",    "magnifierSize2",SepArg, NumberArg,    (caddr_t) &mg_size[1]},
  1599. ***************
  1600. *** 1900,1906 ****
  1601.   #ifndef X10
  1602.   {"-mgs4",    "magnifierSize3",SepArg, NumberArg,    (caddr_t) &mg_size[3]},
  1603.   {"-mgs5",    "magnifierSize3",SepArg, NumberArg,    (caddr_t) &mg_size[4]},
  1604. ! #endif X10
  1605.   };
  1606.   
  1607.   /*
  1608. --- 1928,1934 ----
  1609.   #ifndef X10
  1610.   {"-mgs4",    "magnifierSize3",SepArg, NumberArg,    (caddr_t) &mg_size[3]},
  1611.   {"-mgs5",    "magnifierSize3",SepArg, NumberArg,    (caddr_t) &mg_size[4]},
  1612. ! #endif
  1613.   };
  1614.   
  1615.   /*
  1616. ***************
  1617. *** 1945,1950 ****
  1618. --- 1973,1979 ----
  1619.           }
  1620.           }
  1621.           if (candidate == NULL) {
  1622. + #ifdef    X10
  1623.           if (**arg == '-') usage();
  1624.           if (index(*arg, ':') != NULL) {    /* display */
  1625.               --arg;
  1626. ***************
  1627. *** 1951,1956 ****
  1628. --- 1980,1988 ----
  1629.               candidate = options;
  1630.           }
  1631.           else if (dvi_name) usage();
  1632. + #else
  1633. +         if (**arg == '-' || dvi_name) usage();
  1634. + #endif
  1635.           else {
  1636.               dvi_name = *arg;
  1637.               continue;
  1638. ***************
  1639. *** 1980,1997 ****
  1640.       if ((DISP = XOpenDisplay(display)) == NULL)
  1641.           oops("Can't open display");
  1642.       SCRN = DefaultScreenOfDisplay(DISP);
  1643. ! #else X10
  1644.       if (XOpenDisplay(display) == NULL)
  1645.           oops("Can't open display");
  1646. ! #endif X10
  1647.       for (opt = options; opt < options + XtNumber(options); ++opt)
  1648.           if (opt->resource &&
  1649.   #ifndef X10
  1650.               ((optstring = XGetDefault(DISP, prog, opt->resource)) ||
  1651.               (optstring = XGetDefault(DISP, "XDvi", opt->resource))))
  1652. ! #else X10
  1653.               (optstring = XGetDefault(DPY prog, opt->resource)))
  1654. ! #endif X10
  1655.           switch (opt->argtype) {
  1656.               case StringArg:
  1657.               *((char **) opt->address) = optstring;
  1658. --- 2012,2029 ----
  1659.       if ((DISP = XOpenDisplay(display)) == NULL)
  1660.           oops("Can't open display");
  1661.       SCRN = DefaultScreenOfDisplay(DISP);
  1662. ! #else
  1663.       if (XOpenDisplay(display) == NULL)
  1664.           oops("Can't open display");
  1665. ! #endif
  1666.       for (opt = options; opt < options + XtNumber(options); ++opt)
  1667.           if (opt->resource &&
  1668.   #ifndef X10
  1669.               ((optstring = XGetDefault(DISP, prog, opt->resource)) ||
  1670.               (optstring = XGetDefault(DISP, "XDvi", opt->resource))))
  1671. ! #else
  1672.               (optstring = XGetDefault(DPY prog, opt->resource)))
  1673. ! #endif
  1674.           switch (opt->argtype) {
  1675.               case StringArg:
  1676.               *((char **) opt->address) = optstring;
  1677. ***************
  1678. *** 2005,2011 ****
  1679.           }
  1680.   }
  1681.   
  1682. ! #endif    TOOLKIT
  1683.   
  1684.   static    char    *paper_types[] = {
  1685.       "us",        "8.5x11",
  1686. --- 2037,2043 ----
  1687.           }
  1688.   }
  1689.   
  1690. ! #endif    /* TOOLKIT */
  1691.   
  1692.   static    char    *paper_types[] = {
  1693.       "us",        "8.5x11",
  1694. ***************
  1695. *** 2116,2135 ****
  1696.   {
  1697.   
  1698.   #ifdef    TOOLKIT
  1699.       Widget    form_widget;
  1700.       Widget    right_widget;
  1701. ! #else    TOOLKIT
  1702.   #ifndef X10
  1703.       XSizeHints    size_hints;
  1704.       XWMHints    wmhints;
  1705. ! #else X10
  1706.       OpaqueFrame frame;
  1707.       char    def[32];
  1708.       int    mouspix;
  1709.       Color    cdef;
  1710.       int    x_thick, y_thick;
  1711. ! #endif X10
  1712. ! #endif    TOOLKIT
  1713.       int    screen_w, screen_h;
  1714.   
  1715.   #ifndef    VMS
  1716. --- 2148,2169 ----
  1717.   {
  1718.   
  1719.   #ifdef    TOOLKIT
  1720. + #ifdef    BUTTONS
  1721.       Widget    form_widget;
  1722.       Widget    right_widget;
  1723. ! #endif
  1724. ! #else    /* !TOOLKIT */
  1725.   #ifndef X10
  1726.       XSizeHints    size_hints;
  1727.       XWMHints    wmhints;
  1728. ! #else
  1729.       OpaqueFrame frame;
  1730.       char    def[32];
  1731.       int    mouspix;
  1732.       Color    cdef;
  1733.       int    x_thick, y_thick;
  1734. ! #endif
  1735. ! #endif    /* TOOLKIT */
  1736.       int    screen_w, screen_h;
  1737.   
  1738.   #ifndef    VMS
  1739. ***************
  1740. *** 2146,2153 ****
  1741.   #ifdef    TOOLKIT
  1742.       top_level = XtInitialize(prog, "XDvi", options, XtNumber(options),
  1743.           &argc, argv);
  1744. !     if (argc != 2) usage();
  1745. !     dvi_name = argv[1];
  1746.   
  1747.       XtGetApplicationResources(top_level, (caddr_t) NULL, resources,
  1748.           XtNumber(resources), NULL, 0);
  1749. --- 2180,2192 ----
  1750.   #ifdef    TOOLKIT
  1751.       top_level = XtInitialize(prog, "XDvi", options, XtNumber(options),
  1752.           &argc, argv);
  1753. !     while (--argc > 0) {
  1754. !         if (*(*++argv) == '+')
  1755. !         if (curr_page != NULL) usage();
  1756. !         else curr_page = *argv + 1;
  1757. !         else if (dvi_name != NULL) usage();
  1758. !         else dvi_name = *argv;
  1759. !     }
  1760.   
  1761.       XtGetApplicationResources(top_level, (caddr_t) NULL, resources,
  1762.           XtNumber(resources), NULL, 0);
  1763. ***************
  1764. *** 2155,2173 ****
  1765.       DISP = XtDisplay(top_level);
  1766.       SCRN = XtScreen(top_level);
  1767.   
  1768. ! #else    TOOLKIT
  1769.   
  1770.       parse_options(argc, argv);
  1771.   #ifndef X10
  1772.       if (fore_color) fore_Pixel = string_to_pixel(&fore_color);
  1773.       if (back_color) back_Pixel = string_to_pixel(&back_color);
  1774.       if (high_color) hl_Pixel = string_to_pixel(&high_color);
  1775.       if (curs_color) cr_Pixel = string_to_pixel(&curs_color);
  1776. ! #endif X10
  1777.       if (shrink_factor <= 0 || density <= 0 || pixels_per_inch <= 0 ||
  1778.           dvi_name == NULL) usage();
  1779.   
  1780. ! #endif    TOOLKIT
  1781.   
  1782.       if (shrink_factor != 1) bak_shrink = shrink_factor;
  1783.       mane.shrinkfactor = shrink_factor;
  1784. --- 2194,2213 ----
  1785.       DISP = XtDisplay(top_level);
  1786.       SCRN = XtScreen(top_level);
  1787.   
  1788. ! #else    /* !TOOLKIT */
  1789.   
  1790.       parse_options(argc, argv);
  1791.   #ifndef X10
  1792.       if (fore_color) fore_Pixel = string_to_pixel(&fore_color);
  1793.       if (back_color) back_Pixel = string_to_pixel(&back_color);
  1794. +     if (brdr_color) brdr_Pixel = string_to_pixel(&brdr_color);
  1795.       if (high_color) hl_Pixel = string_to_pixel(&high_color);
  1796.       if (curs_color) cr_Pixel = string_to_pixel(&curs_color);
  1797. ! #endif
  1798.       if (shrink_factor <= 0 || density <= 0 || pixels_per_inch <= 0 ||
  1799.           dvi_name == NULL) usage();
  1800.   
  1801. ! #endif    /* TOOLKIT */
  1802.   
  1803.       if (shrink_factor != 1) bak_shrink = shrink_factor;
  1804.       mane.shrinkfactor = shrink_factor;
  1805. ***************
  1806. *** 2200,2205 ****
  1807. --- 2240,2246 ----
  1808.           if (!fore_color) fore_Pixel = BlackPixelOfScreen(SCRN);
  1809.           if (!back_color) back_Pixel = WhitePixelOfScreen(SCRN);
  1810.       }
  1811. +     if (!brdr_color) brdr_Pixel = fore_Pixel;
  1812.       {
  1813.           XGCValues    values;
  1814.           Pixel    set_bits = (Pixel) (fore_Pixel & ~back_Pixel);
  1815. ***************
  1816. *** 2270,2278 ****
  1817.   #ifdef    BUTTONS
  1818.       temp_args3[0].value = (XtArgVal) (page_w + XTRA_WID < screen_w ?
  1819.                         page_w + XTRA_WID : screen_w);
  1820. ! #else    BUTTONS
  1821.       temp_args3[0].value = (XtArgVal) (page_w<screen_w ? page_w : screen_w);
  1822. ! #endif    BUTTONS
  1823.       temp_args3[1].value = (XtArgVal) (page_h<screen_h ? page_h : screen_h);
  1824.       temp_args3[2].value = (XtArgVal) (XCreateBitmapFromData(DISP,
  1825.                   RootWindowOfScreen(SCRN),
  1826. --- 2311,2319 ----
  1827.   #ifdef    BUTTONS
  1828.       temp_args3[0].value = (XtArgVal) (page_w + XTRA_WID < screen_w ?
  1829.                         page_w + XTRA_WID : screen_w);
  1830. ! #else
  1831.       temp_args3[0].value = (XtArgVal) (page_w<screen_w ? page_w : screen_w);
  1832. ! #endif
  1833.       temp_args3[1].value = (XtArgVal) (page_h<screen_h ? page_h : screen_h);
  1834.       temp_args3[2].value = (XtArgVal) (XCreateBitmapFromData(DISP,
  1835.                   RootWindowOfScreen(SCRN),
  1836. ***************
  1837. *** 2309,2318 ****
  1838.               command_args, XtNumber(command_args));
  1839.           }
  1840.       }
  1841. ! #else    BUTTONS
  1842.       vport_widget = XtCreateManagedWidget("vport", viewportWidgetClass,
  1843.           top_level, vport_args, XtNumber(vport_args));
  1844. ! #endif    BUTTONS
  1845.       clip_widget = XtNameToWidget(vport_widget, "clip");
  1846.       draw_args[0].value = (XtArgVal) page_w;
  1847.       draw_args[1].value = (XtArgVal) page_h;
  1848. --- 2350,2359 ----
  1849.               command_args, XtNumber(command_args));
  1850.           }
  1851.       }
  1852. ! #else    /* !BUTTONS */
  1853.       vport_widget = XtCreateManagedWidget("vport", viewportWidgetClass,
  1854.           top_level, vport_args, XtNumber(vport_args));
  1855. ! #endif    /* BUTTONS */
  1856.       clip_widget = XtNameToWidget(vport_widget, "clip");
  1857.       draw_args[0].value = (XtArgVal) page_w;
  1858.       draw_args[1].value = (XtArgVal) page_h;
  1859. ***************
  1860. *** 2339,2345 ****
  1861.   
  1862.       curr.win = mane.win = (caddr_t) XtWindow(draw_widget);
  1863.   
  1864. ! #else    TOOLKIT
  1865.   
  1866.       /*
  1867.        *    X11 windows (non toolkit)
  1868. --- 2380,2386 ----
  1869.   
  1870.       curr.win = mane.win = (caddr_t) XtWindow(draw_widget);
  1871.   
  1872. ! #else    /* !TOOLKIT */
  1873.   
  1874.       /*
  1875.        *    X11 windows (non toolkit)
  1876. ***************
  1877. *** 2379,2385 ****
  1878.       size_hints.height = window_h;
  1879.       top_level = XCreateSimpleWindow(DISP, RootWindowOfScreen(SCRN),
  1880.           size_hints.x, size_hints.y, window_w, window_h, bwidth,
  1881. !         fore_Pixel, back_Pixel);
  1882.       XSetStandardProperties(DISP, top_level, dvi_name, prog, NULL,
  1883.           argv, argc, &size_hints);
  1884.   
  1885. --- 2420,2426 ----
  1886.       size_hints.height = window_h;
  1887.       top_level = XCreateSimpleWindow(DISP, RootWindowOfScreen(SCRN),
  1888.           size_hints.x, size_hints.y, window_w, window_h, bwidth,
  1889. !         brdr_Pixel, back_Pixel);
  1890.       XSetStandardProperties(DISP, top_level, dvi_name, prog, NULL,
  1891.           argv, argc, &size_hints);
  1892.   
  1893. ***************
  1894. *** 2402,2408 ****
  1895.       XMapWindow(DISP, top_level);
  1896.       Flush();
  1897.   
  1898. ! #endif    TOOLKIT
  1899.   
  1900.       image = XCreateImage(DISP, DefaultVisualOfScreen(SCRN), 1, XYBitmap, 0,
  1901.                    (char *)NULL, 0, 0, BITS_PER_BMUNIT, 0);
  1902. --- 2443,2449 ----
  1903.       XMapWindow(DISP, top_level);
  1904.       Flush();
  1905.   
  1906. ! #endif    /* TOOLKIT */
  1907.   
  1908.       image = XCreateImage(DISP, DefaultVisualOfScreen(SCRN), 1, XYBitmap, 0,
  1909.                    (char *)NULL, 0, 0, BITS_PER_BMUNIT, 0);
  1910. ***************
  1911. *** 2409,2423 ****
  1912.       image->bitmap_unit = BITS_PER_BMUNIT;
  1913.   #ifndef    MSBITFIRST
  1914.       image->bitmap_bit_order = LSBFirst;
  1915. ! #else    MSBITFIRST
  1916.       image->bitmap_bit_order = MSBFirst;
  1917. ! #endif    MSBITFIRST
  1918.       {
  1919.           short endian = MSBFirst << 8 | LSBFirst;
  1920.           image->byte_order = *((char *) &endian);
  1921.       }
  1922.   
  1923. ! #else X10
  1924.   
  1925.       /*
  1926.        *    X10 colors
  1927. --- 2450,2464 ----
  1928.       image->bitmap_unit = BITS_PER_BMUNIT;
  1929.   #ifndef    MSBITFIRST
  1930.       image->bitmap_bit_order = LSBFirst;
  1931. ! #else
  1932.       image->bitmap_bit_order = MSBFirst;
  1933. ! #endif
  1934.       {
  1935.           short endian = MSBFirst << 8 | LSBFirst;
  1936.           image->byte_order = *((char *) &endian);
  1937.       }
  1938.   
  1939. ! #else    /* X10 */
  1940.   
  1941.       /*
  1942.        *    X10 colors
  1943. ***************
  1944. *** 2449,2460 ****
  1945.               backpix = cdef.pixel;
  1946.               backmap = XMakeTile(backpix);
  1947.           }
  1948. -         if (high_color && XParseColor(high_color, &cdef) &&
  1949. -             XGetHardwareColor(&cdef))
  1950. -             highGC = cdef.pixel;
  1951.           if (brdr_color && XParseColor(brdr_color, &cdef) &&
  1952.               XGetHardwareColor(&cdef))
  1953.               bdrmap = XMakeTile(cdef.pixel);
  1954.           if (curs_color && XParseColor(curs_color, &cdef) &&
  1955.               XGetHardwareColor(&cdef))
  1956.               mouspix = cdef.pixel;
  1957. --- 2490,2501 ----
  1958.               backpix = cdef.pixel;
  1959.               backmap = XMakeTile(backpix);
  1960.           }
  1961.           if (brdr_color && XParseColor(brdr_color, &cdef) &&
  1962.               XGetHardwareColor(&cdef))
  1963.               bdrmap = XMakeTile(cdef.pixel);
  1964. +         if (high_color && XParseColor(high_color, &cdef) &&
  1965. +             XGetHardwareColor(&cdef))
  1966. +             highGC = cdef.pixel;
  1967.           if (curs_color && XParseColor(curs_color, &cdef) &&
  1968.               XGetHardwareColor(&cdef))
  1969.               mouspix = cdef.pixel;
  1970. ***************
  1971. *** 2489,2495 ****
  1972.       XDefineCursor(top_level,
  1973.           XCreateCursor(xdvi_width, xdvi_height, xdvi_bits, xdvi_mask_bits,
  1974.                 xdvi_x_hot, xdvi_y_hot, mouspix, backpix, GXcopy));
  1975. ! #endif X10
  1976.   
  1977.       do_pages();
  1978.   }
  1979. --- 2530,2536 ----
  1980.       XDefineCursor(top_level,
  1981.           XCreateCursor(xdvi_width, xdvi_height, xdvi_bits, xdvi_mask_bits,
  1982.                 xdvi_x_hot, xdvi_y_hot, mouspix, backpix, GXcopy));
  1983. ! #endif    /* X10 */
  1984.   
  1985.       do_pages();
  1986.   }
  1987. diff -cr old/xdvi.h new/xdvi.h
  1988. *** old/xdvi.h    Mon May  7 18:48:42 1990
  1989. --- new/xdvi.h    Sun May  6 18:52:18 1990
  1990. ***************
  1991. *** 5,11 ****
  1992.   
  1993.   #ifndef X10
  1994.   #include <X11/Xos.h>    /* same as below */
  1995. ! #else X10
  1996.   #include <sys/types.h>    /* for sites without X11 */
  1997.   #ifdef    SYSV
  1998.   #include <string.h>
  1999. --- 5,11 ----
  2000.   
  2001.   #ifndef X10
  2002.   #include <X11/Xos.h>    /* same as below */
  2003. ! #else    /* X10 */
  2004.   #include <sys/types.h>    /* for sites without X11 */
  2005.   #ifdef    SYSV
  2006.   #include <string.h>
  2007. ***************
  2008. *** 16,22 ****
  2009.   #include <strings.h>
  2010.   #endif /* SYSV */
  2011.   #include <sys/file.h>
  2012. ! #endif X10
  2013.   
  2014.   #ifdef    VMS
  2015.   #include <string.h>
  2016. --- 16,22 ----
  2017.   #include <strings.h>
  2018.   #endif /* SYSV */
  2019.   #include <sys/file.h>
  2020. ! #endif    /* X10 */
  2021.   
  2022.   #ifdef    VMS
  2023.   #include <string.h>
  2024. ***************
  2025. *** 30,39 ****
  2026.   #ifndef    OPEN_MODE
  2027.   #ifndef    VMS
  2028.   #define    OPEN_MODE    "r"
  2029. ! #else    VMS
  2030.   #define    OPEN_MODE    "r", "ctx=stm"
  2031. ! #endif    VMS
  2032. ! #endif    OPEN_MODE
  2033.   
  2034.   #define    Printf    (void) printf
  2035.   #define    Fprintf    (void) fprintf
  2036. --- 30,39 ----
  2037.   #ifndef    OPEN_MODE
  2038.   #ifndef    VMS
  2039.   #define    OPEN_MODE    "r"
  2040. ! #else    /* VMS */
  2041.   #define    OPEN_MODE    "r", "ctx=stm"
  2042. ! #endif    /* VMS */
  2043. ! #endif    /* OPEN_MODE */
  2044.   
  2045.   #define    Printf    (void) printf
  2046.   #define    Fprintf    (void) fprintf
  2047. ***************
  2048. *** 75,81 ****
  2049.   #undef    MSBITFIRST
  2050.   #undef    BMLONG
  2051.   #define    BMSHORT
  2052. ! #endif X10
  2053.   
  2054.   #ifndef    SYSV
  2055.   #ifndef    VMS
  2056. --- 75,81 ----
  2057.   #undef    MSBITFIRST
  2058.   #undef    BMLONG
  2059.   #define    BMSHORT
  2060. ! #endif
  2061.   
  2062.   #ifndef    SYSV
  2063.   #ifndef    VMS
  2064. ***************
  2065. *** 87,103 ****
  2066.   #define    BMUNIT            unsigned long
  2067.   #define    BITS_PER_BMUNIT        32
  2068.   #define    BYTES_PER_BMUNIT    4
  2069. ! #else    BMLONG
  2070.   #ifdef    BMSHORT
  2071.   #define    BMUNIT            unsigned short
  2072.   #define    BITS_PER_BMUNIT        16
  2073.   #define    BYTES_PER_BMUNIT    2
  2074. ! #else    BMSHORT
  2075.   #define    BMUNIT            unsigned char
  2076.   #define    BITS_PER_BMUNIT        8
  2077.   #define    BYTES_PER_BMUNIT    1
  2078. ! #endif    BMSHORT
  2079. ! #endif    BMLONG
  2080.   
  2081.   #define    ADD(a, b)    ((BMUNIT *) (((char *) a) + b))
  2082.   #define    SUB(a, b)    ((BMUNIT *) (((char *) a) - b))
  2083. --- 87,103 ----
  2084.   #define    BMUNIT            unsigned long
  2085.   #define    BITS_PER_BMUNIT        32
  2086.   #define    BYTES_PER_BMUNIT    4
  2087. ! #else    /* BMLONG */
  2088.   #ifdef    BMSHORT
  2089.   #define    BMUNIT            unsigned short
  2090.   #define    BITS_PER_BMUNIT        16
  2091.   #define    BYTES_PER_BMUNIT    2
  2092. ! #else    /* BMSHORT */
  2093.   #define    BMUNIT            unsigned char
  2094.   #define    BITS_PER_BMUNIT        8
  2095.   #define    BYTES_PER_BMUNIT    1
  2096. ! #endif    /* BMSHORT */
  2097. ! #endif    /* BMLONG */
  2098.   
  2099.   #define    ADD(a, b)    ((BMUNIT *) (((char *) a) + b))
  2100.   #define    SUB(a, b)    ((BMUNIT *) (((char *) a) - b))
  2101. diff -cr old/xdvi_man.sed new/xdvi_man.sed
  2102. *** old/xdvi_man.sed    Mon May  7 18:48:46 1990
  2103. --- new/xdvi_man.sed    Thu May 10 20:15:19 1990
  2104. ***************
  2105. *** 1,7 ****
  2106.   #ifx11
  2107. ! .TH XDVI SIPB "8 May 1989" "X Version 11"
  2108.   #ifx10
  2109. ! .TH XDVI SIPB "8 May 1989" "X Version 10"
  2110.   #endif
  2111.   .SH NAME
  2112.   xdvi \- DVI Previewer for the X Window System
  2113. --- 1,7 ----
  2114.   #ifx11
  2115. ! .TH XDVI 1 "27 March 1990" "X Version 11"
  2116.   #ifx10
  2117. ! .TH XDVI 1 "27 March 1990" "X Version 10"
  2118.   #endif
  2119.   .SH NAME
  2120.   xdvi \- DVI Previewer for the X Window System
  2121. ***************
  2122. *** 8,21 ****
  2123.   .SH SYNOPSIS
  2124.   .B xdvi
  2125.   .nh
  2126. ! [+[\fIpage\fP]] [\-s \fIshrink\fP] [\-S \fIdensity\fP] [\-p \fIpixels\fP]
  2127. ! [\-l] [\-rv] [\-fg \fIcolor\fP] [\-bg \fIcolor\fP]
  2128. ! [\-hl \fIcolor\fP] [\-bd \fIcolor\fP] [\-cr \fIcolor\fP]
  2129. ! [\-margins \fIinches\fP] [\-sidemargin \fIinches\fP] [\-topmargin \fIinches\fP]
  2130.   [\-paper \fIpapertype\fP] [\-mgs[\fIn\fP] \fIsize\fP] [\-altfont \fIfont\fP]
  2131.   #ifx11
  2132. ! [#\fIgeometry\fP] [\-geometry \fIgeometry\fP] [\-display \fIdisplay\fP]
  2133. ! [-copy] [-thorough]
  2134.   #ifx10
  2135.   [\-geometry \fIgeometry\fP | =\fIgeometry\fP]
  2136.   [\-display \fIhost\fP:\fIdisplay\fP | \fIhost\fP:\fIdisplay\fP]
  2137. --- 8,21 ----
  2138.   .SH SYNOPSIS
  2139.   .B xdvi
  2140.   .nh
  2141. ! [+[\fIpage\fP]] [\-s \fIshrink\fP] [\-S \fIdensity\fP] [\-p \fIpixels\fP] [\-l]
  2142.   [\-paper \fIpapertype\fP] [\-mgs[\fIn\fP] \fIsize\fP] [\-altfont \fIfont\fP]
  2143. + [\-margins \fIinches\fP] [\-sidemargin \fIinches\fP] [\-topmargin \fIinches\fP]
  2144. + [\-rv] [\-fg \fIcolor\fP] [\-bg \fIcolor\fP]
  2145. + [\-hl \fIcolor\fP] [\-bd \fIcolor\fP] [\-cr \fIcolor\fP] [\-bw \fIwidth\fP]
  2146.   #ifx11
  2147. ! [\-geometry \fIgeometry\fP] [-icongeometry \fIgeometry\fP] [-iconic]
  2148. ! [\-display \fIdisplay\fP] [-copy] [-thorough]
  2149.   #ifx10
  2150.   [\-geometry \fIgeometry\fP | =\fIgeometry\fP]
  2151.   [\-display \fIhost\fP:\fIdisplay\fP | \fIhost\fP:\fIdisplay\fP]
  2152. ***************
  2153. *** 73,78 ****
  2154. --- 73,81 ----
  2155.   Determines the density used when shrinking bitmaps for fonts.
  2156.   A higher value produces a lighter font.  The default value is 40.
  2157.   .TP
  2158. + .BI \-density " density"
  2159. + Same as \fB-S\fR.
  2160. + .TP
  2161.   .BI \-p " pixels"
  2162.   (%%dot%%pixelsPerInch)
  2163.   Defines the size of the fonts to use, in pixels per inch.  The
  2164. ***************
  2165. *** 97,103 ****
  2166.   Specifies the width of the border of the window.
  2167.   .TP
  2168.   .BI \-borderwidth " width"
  2169. ! Same as \fB-bw\fR, above.
  2170.   .TP
  2171.   .BI \-fg " color"
  2172.   (%%dot%%foreground)
  2173. --- 100,106 ----
  2174.   Specifies the width of the border of the window.
  2175.   .TP
  2176.   .BI \-borderwidth " width"
  2177. ! Same as \fB-bw\fR.
  2178.   .TP
  2179.   .BI \-fg " color"
  2180.   (%%dot%%foreground)
  2181. ***************
  2182. *** 104,110 ****
  2183.   Determines the color of the text (foreground).
  2184.   .TP
  2185.   .BI \-foreground " color"
  2186. ! Same as \fB-fg\fR, above.
  2187.   .TP
  2188.   .BI \-bg " color"
  2189.   (%%dot%%background)
  2190. --- 107,113 ----
  2191.   Determines the color of the text (foreground).
  2192.   .TP
  2193.   .BI \-foreground " color"
  2194. ! Same as \fB-fg\fR.
  2195.   .TP
  2196.   .BI \-bg " color"
  2197.   (%%dot%%background)
  2198. ***************
  2199. *** 111,130 ****
  2200.   Determines the color of the background.
  2201.   .TP
  2202.   .BI \-background " color"
  2203. ! Same as \fB-bg\fR, above.
  2204.   .TP
  2205.   .BI \-hl " color"
  2206.   (%%dot%%highlight)
  2207. ! Determines the color of the page border.
  2208.   .TP
  2209.   .BI \-bd " color"
  2210.   (%%dot%%borderColor)
  2211.   Determines the color of the window border.
  2212.   .TP
  2213.   .BI \-cr " color"
  2214.   (%%dot%%cursorColor)
  2215. ! Determines the color of the cursor.  The default is the
  2216. ! foreground color.
  2217.   #ifx11
  2218.   .TP
  2219.   .B \-thorough
  2220. --- 114,136 ----
  2221.   Determines the color of the background.
  2222.   .TP
  2223.   .BI \-background " color"
  2224. ! Same as \fB-bg\fR.
  2225.   .TP
  2226.   .BI \-hl " color"
  2227.   (%%dot%%highlight)
  2228. ! Determines the color of the page border.  The default is the foreground color.
  2229.   .TP
  2230.   .BI \-bd " color"
  2231.   (%%dot%%borderColor)
  2232.   Determines the color of the window border.
  2233.   .TP
  2234. + .BI \-bordercolor " color"
  2235. + Same as \fB-bd\fR.
  2236. + .TP
  2237.   .BI \-cr " color"
  2238.   (%%dot%%cursorColor)
  2239. ! Determines the color of the cursor.  The default is the color of the page
  2240. ! border.
  2241.   #ifx11
  2242.   .TP
  2243.   .B \-thorough
  2244. ***************
  2245. *** 184,190 ****
  2246.   350, 600, 900, and 1200.
  2247.   .TP
  2248.   .BI \-mgs " size"
  2249. ! Same as \fB-mgs1\fR, above.
  2250.   #ifx10
  2251.   .BI \-mgs " size"
  2252.   (magnifierSize1)
  2253. --- 190,196 ----
  2254.   350, 600, 900, and 1200.
  2255.   .TP
  2256.   .BI \-mgs " size"
  2257. ! Same as \fB-mgs1\fR.
  2258.   #ifx10
  2259.   .BI \-mgs " size"
  2260.   (magnifierSize1)
  2261. ***************
  2262. *** 192,198 ****
  2263.   for the left button.  See the MOUSE ACTIONS section.  Default is 200.
  2264.   .TP
  2265.   .BI \-mgs1 " size"
  2266. ! Same as \fB-mgs\fR, above.
  2267.   .TP
  2268.   .BI \-mgs2 " size"
  2269.   (magnifierSize2)
  2270. --- 198,204 ----
  2271.   for the left button.  See the MOUSE ACTIONS section.  Default is 200.
  2272.   .TP
  2273.   .BI \-mgs1 " size"
  2274. ! Same as \fB-mgs\fR.
  2275.   .TP
  2276.   .BI \-mgs2 " size"
  2277.   (magnifierSize2)
  2278. ***************
  2279. *** 210,218 ****
  2280.   (*geometry)
  2281.   Specifies the initial geometry of the window.
  2282.   .TP
  2283. ! .BI # geometry
  2284.   (%%dot%%iconGeometry)
  2285.   Specifies the initial position for the icon.
  2286.   #ifx10
  2287.   .BI = geometry
  2288.   (geometry)
  2289. --- 216,229 ----
  2290.   (*geometry)
  2291.   Specifies the initial geometry of the window.
  2292.   .TP
  2293. ! .BI \-icongeometry " geometry
  2294.   (%%dot%%iconGeometry)
  2295.   Specifies the initial position for the icon.
  2296. + .TP
  2297. + .B \-iconic
  2298. + (%%dot%%iconic)
  2299. + Causes the XDVI window to start in the iconic state.  The default is to
  2300. + start with the window open.
  2301.   #ifx10
  2302.   .BI = geometry
  2303.   (geometry)
  2304. ***************
  2305. *** 256,274 ****
  2306.   .B ^
  2307.   Move to the ``home'' position of the page.  This is normally the upper
  2308.   left-hand corner of the page, depending on the margins as described in
  2309. ! the \-margins option, above.
  2310.   .TP
  2311.   .B u
  2312. ! Moves up a window-full.
  2313.   .TP
  2314.   .B d
  2315. ! Moves down a window-full.
  2316.   .TP
  2317.   .B l
  2318. ! Moves left a window-full.
  2319.   .TP
  2320.   .B r
  2321. ! Moves right a window-full.
  2322.   .TP
  2323.   .B c
  2324.   Moves the page so that the point currently beneath the cursor is moved to
  2325. --- 267,285 ----
  2326.   .B ^
  2327.   Move to the ``home'' position of the page.  This is normally the upper
  2328.   left-hand corner of the page, depending on the margins as described in
  2329. ! the \-\fBmargins\fR option, above.
  2330.   .TP
  2331.   .B u
  2332. ! Moves up two thirds of a window-full.
  2333.   .TP
  2334.   .B d
  2335. ! Moves down two thirds of a window-full.
  2336.   .TP
  2337.   .B l
  2338. ! Moves left two thirds of a window-full.
  2339.   .TP
  2340.   .B r
  2341. ! Moves right two thirds of a window-full.
  2342.   .TP
  2343.   .B c
  2344.   Moves the page so that the point currently beneath the cursor is moved to
  2345. ***************
  2346. *** 276,282 ****
  2347.   .TP
  2348.   .B M
  2349.   Sets the margins so that the point currently under the cursor is the upper
  2350. ! left-hand corner of the text in the page.
  2351.   .TP
  2352.   .B s
  2353.   Changes the shrink factor to the given number.  If no number is given, the
  2354. --- 287,295 ----
  2355.   .TP
  2356.   .B M
  2357.   Sets the margins so that the point currently under the cursor is the upper
  2358. ! left-hand corner of the text in the page.  Note that this command itself does
  2359. ! not move the image at all.  For details on how the margins are used, see
  2360. ! the \-\fBmargins\fR option.
  2361.   .TP
  2362.   .B s
  2363.   Changes the shrink factor to the given number.  If no number is given, the
  2364. ***************
  2365. *** 301,307 ****
  2366.   any mouse button will pop up a ``magnifying glass'' which shows the unshrunk
  2367.   image in the vicinity of the mouse click.  This subwindow disappears when
  2368.   the mouse button is released.  Different mouse buttons produce different sized
  2369. ! windows, as indicated by the \fB\-mgs\fR option, above.  Moving the cursor
  2370.   while holding the button down will move the magnifying glass.
  2371.   .PP
  2372.   Also, the scrollbars (if present) behave in the standard way:  pushing Button 2
  2373. --- 314,320 ----
  2374.   any mouse button will pop up a ``magnifying glass'' which shows the unshrunk
  2375.   image in the vicinity of the mouse click.  This subwindow disappears when
  2376.   the mouse button is released.  Different mouse buttons produce different sized
  2377. ! windows, as indicated by the \fB\-mgs\fR option.  Moving the cursor
  2378.   while holding the button down will move the magnifying glass.
  2379.   .PP
  2380.   Also, the scrollbars (if present) behave in the standard way:  pushing Button 2
  2381. dan
  2382. ----------------------------------------------------
  2383. O'Reilly && Associates   argv@sun.com / argv@ora.com
  2384. Opinions expressed reflect those of the author only.
  2385.